feature(dockerfile): allow setting separate GID
This commit is contained in:
parent
762b97d19d
commit
d0eb4cc821
@ -5,10 +5,11 @@ ARG NODE_VERSION=16
|
|||||||
ARG ALPINE_VERSION=3.14
|
ARG ALPINE_VERSION=3.14
|
||||||
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION}
|
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION}
|
||||||
|
|
||||||
# create new node user with set id from build-arg and create volume directories
|
# create new node user with set UID and GID from build-args and create volume directories
|
||||||
ARG NODE_UID=9999
|
ARG NODE_UID=9999
|
||||||
|
ARG NODE_GID=9999
|
||||||
RUN deluser --remove-home node \
|
RUN deluser --remove-home node \
|
||||||
&& addgroup -g ${NODE_UID} -S node \
|
&& addgroup -g ${NODE_GID} -S node \
|
||||||
&& adduser -G node -S -u ${NODE_UID} node \
|
&& adduser -G node -S -u ${NODE_UID} node \
|
||||||
&& mkdir /watch /certs \
|
&& mkdir /watch /certs \
|
||||||
&& chown root:node /certs \
|
&& chown root:node /certs \
|
||||||
|
Loading…
Reference in New Issue
Block a user