Skip to content

Commit

Permalink
Bytt fra chainguard til distroless image
Browse files Browse the repository at this point in the history
Da chainguard kun har latest node, og som en følge av denne buggen: nodejs/node#54543 vurderer vi det dithen at vi ikke lenger vil være på chainguard.

Co-authored-by: Thomas Dufourd <thomas.dufourd@nav.no>
  • Loading branch information
klechr and thomasdufourd committed Aug 28, 2024
1 parent e2fdd0e commit c3a7029
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM cgr.dev/chainguard/node:latest

ENV NODE_ENV=production

FROM node:22-alpine as builder
WORKDIR /app

COPY --chown=node:node ./server/build build
COPY --chown=node:node ./client/dist client/dist
COPY --chown=node:node ./server/package*.json ./

COPY --chown=node:node ./client/dist client/dist
RUN npm ci --production

FROM gcr.io/distroless/nodejs22-debian12 as runner
WORKDIR /app
COPY --from=builder /app /app
ENV NODE_ENV=production
CMD ["/app/build/server.js"]

0 comments on commit c3a7029

Please sign in to comment.