Update Dockerfile

This commit is contained in:
VinceC
2025-01-04 11:57:50 -06:00
parent 8c7c3fc257
commit 667dc6eddb

View File

@@ -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