File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 11# Use the latest LTS version of Node.js
22# https://hub.docker.com/_/node
3- FROM node:22-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e AS build-stage
3+ FROM node:22 AS build-stage
44WORKDIR /usr/src/app
55
66# Copy package.json and package-lock.json
@@ -15,20 +15,10 @@ COPY . .
1515RUN npm run build
1616
1717# The same image but now only install the production dependencies as the frontend is already built using vite in the build-stage
18- FROM node:22-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e AS production
18+ FROM gcr.io/distroless/nodejs22-debian12 AS production
1919
2020WORKDIR /usr/src/app
2121
22- # copy over package.json from the origin file system again so it can be done in parallel from docker (if configured)
23- COPY package*.json ./
24- # install only dependencies which are not marked as dev
25- RUN npm ci --omit=dev
26-
27- # copy over necessary files for the server
28- COPY server.js ./
29- COPY server server
30-
31- # copy over precompiled frontend
32- COPY --from=build-stage /usr/src/app/dist dist
22+ COPY --from=build-stage /usr/src/app /usr/src/app
3323
34- CMD ["npm" , "run" , "start " ]
24+ CMD ["server.js " ]
You can’t perform that action at this time.
0 commit comments