Merge pull request #2917 from bill88t/master

Added the USER_UID & USER_GID env variables
This commit is contained in:
zadam 2022-06-13 23:17:59 +02:00
parent df3fdb59c5
commit f0ab1fb5a1
2 changed files with 4 additions and 1 deletions

View file

@ -22,7 +22,7 @@ RUN set -x \
&& apk del .build-dependencies
# Some setup tools need to be kept
RUN apk add --no-cache su-exec
RUN apk add --no-cache su-exec shadow
# Bundle app source
COPY . .

View file

@ -1,4 +1,7 @@
#!/bin/sh
[[ ! -z "${USER_UID}" ]] && usermod -u ${USER_UID} node || echo "No USER_UID specified, leaving 1000"
[[ ! -z "${USER_GID}" ]] && groupmod -g ${USER_GID} node || echo "No USER_GID specified, leaving 1000"
chown -R node:node /home/node
su-exec node node ./src/www