Skip to content

Commit

Permalink
build: use non-root user for API container
Browse files Browse the repository at this point in the history
  • Loading branch information
JSPRH committed Feb 1, 2024
1 parent f8367c8 commit 61696a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN npm --omit=dev ci
COPY ./dist/apps/api ./

# Use distroless for maximum security: https://github.com/GoogleContainerTools/distroless
FROM gcr.io/distroless/nodejs${NODE_VERSION}-debian11
FROM gcr.io/distroless/nodejs${NODE_VERSION}-debian12:nonroot

COPY --from=builder /app /app
COPY --chown=nonroot --from=builder /app /app
WORKDIR /app

ENV PORT=3333
Expand Down

0 comments on commit 61696a5

Please sign in to comment.