Update Dockerfile
This commit is contained in:
@@ -17,9 +17,9 @@ RUN npm ci --only=production
|
|||||||
# Bundle app source
|
# Bundle app source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Create a non-root user
|
# Create a non-root user with system UID
|
||||||
RUN addgroup --system --gid 1001 nodejs && \
|
RUN addgroup --system --gid 999 nodejs && \
|
||||||
adduser --system --uid 1001 --ingroup nodejs nodejs && \
|
adduser --system --uid 999 --ingroup nodejs --no-create-home nodejs && \
|
||||||
chown -R nodejs:nodejs /usr/src/app
|
chown -R nodejs:nodejs /usr/src/app
|
||||||
|
|
||||||
USER nodejs
|
USER nodejs
|
||||||
|
|||||||
Reference in New Issue
Block a user