File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,19 @@ RUN apk add pnpm
44
55COPY . .
66
7- RUN pnpm install && pnpm run build
8- RUN pnpm install --ignore-scripts vite-express
7+ RUN pnpm install
8+ RUN pnpm run build
9+ # Delete node_modules that contain dev deps and only install runtime deps
10+ # in the version that is copied to the final output
11+ RUN rm -rf node_modules/
12+ RUN pnpm install -P --ignore-scripts
913
1014FROM gcr.io/distroless/nodejs20-debian12:debug-nonroot
1115
1216COPY --from=builder --chown=nonroot:nonroot --chmod=777 /usr/local/app/dist /app/dist/
1317COPY --from=builder --chown=nonroot:nonroot --chmod=555 /usr/local/app/node_modules /app/node_modules
14- COPY --from=builder --chown=nonroot:nonroot --chmod=555 /usr/local/app/package*.json /usr/local/app/server.js /app/
18+ COPY --from=builder --chown=nonroot:nonroot --chmod=444 /usr/local/app/package*.json /app/
19+ COPY --from=builder --chown=nonroot:nonroot --chmod=555 /usr/local/app/server.js /app/
1520
1621WORKDIR /app
1722ENV NODE_ENV=production
Original file line number Diff line number Diff line change 1919 "@effect/platform" : " ^0.70.7" ,
2020 "@emotion/react" : " ^11.14.0" ,
2121 "@emotion/styled" : " ^11.14.0" ,
22- "@esbuild-plugins/node-globals-polyfill" : " ^0.2.3" ,
2322 "@mui/material" : " ^5.17.1" ,
2423 "@statisticsnorway/ssb-component-library" : " ^2.4.9" ,
2524 "body-parser" : " ^1.20.3" ,
4544 "zustand" : " ^5.0.3"
4645 },
4746 "devDependencies" : {
47+ "@esbuild-plugins/node-globals-polyfill" : " ^0.2.3" ,
4848 "@eslint/compat" : " ^1.2.8" ,
4949 "@eslint/eslintrc" : " ^3.3.1" ,
5050 "@eslint/js" : " ^9.25.1" ,
You can’t perform that action at this time.
0 commit comments