Fixhancement: improve UID support (#5963)
This commit is contained in:
parent
0dafc792f7
commit
8a75c9b6e3
2 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue