diff --git a/Dockerfile b/Dockerfile index d58737923..2e5ff0339 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,8 @@ COPY --link --from=builder --chown=1000:1000 /app/.next/static/ ./.next/static RUN apk add --no-cache su-exec iputils-ping shadow +USER root + ENV NODE_ENV=production ENV HOSTNAME=0.0.0.0 ENV PORT=3000 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 16ce33aa6..5e8f7aa56 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -57,8 +57,8 @@ if [ -d /app/.next ]; then fi # Drop privileges (when asked to) if root, otherwise run as current user -if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then - su-exec ${PUID}:${PGID} "$@" +if [ "$(id -u)" = "0" ] && [ "${PUID}" != "0" ]; then + exec su-exec ${PUID}:${PGID} "$@" else exec "$@" fi