diff --git a/Dockerfile b/Dockerfile index 93e2725..b5c670f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,9 @@ RUN npm ci --only=production # Bundle app source COPY . . -# Create a non-root user -RUN addgroup --system --gid 1001 nodejs && \ - adduser --system --uid 1001 --ingroup nodejs nodejs && \ +# Create a non-root user with system UID +RUN addgroup --system --gid 999 nodejs && \ + adduser --system --uid 999 --ingroup nodejs --no-create-home nodejs && \ chown -R nodejs:nodejs /usr/src/app USER nodejs