Update Dockerfile
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user