File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1- v20.15 .0
1+ v22.14 .0
Original file line number Diff line number Diff line change 1- FROM node:20.15.0-bookworm-slim AS base
2- RUN adduser --disabled-password -home /home/cfu -shell /bin/bash cfu
3- WORKDIR /root/cf-runtime
4- COPY package.json yarn.lock ./
1+ ARG NODE_VERSION=22.14.0
2+ FROM node:${NODE_VERSION}-bookworm-slim AS base
3+ WORKDIR /app
54
65FROM base AS build-dependencies
76RUN apt-get update \
@@ -11,6 +10,7 @@ RUN apt-get update \
1110 git \
1211 make \
1312 python3
13+ COPY package.json yarn.lock ./
1414
1515FROM build-dependencies AS build
1616RUN yarn install --frozen-lockfile
@@ -20,12 +20,12 @@ RUN yarn build
2020FROM build-dependencies AS prod-dependencies
2121RUN yarn install --frozen-lockfile --production
2222
23- FROM base AS production
24- COPY --from=prod-dependencies /root/cf-runtime/node_modules ./node_modules
25- COPY --from=build /root/cf-runtime/dist ./lib
23+ FROM base AS final
24+ # purpose of security
25+ RUN npm uninstall -g --logs-max=0 corepack npm
26+ USER node
2627
27- # purpose of security
28- RUN npm -g uninstall npm
28+ COPY --from=prod-dependencies --chown=node:node /app/node_modules node_modules
29+ COPY --from=build --chown=node:node /app/dist lib
2930
30- USER cfu
3131CMD ["node" , "lib/index.js" ]
Original file line number Diff line number Diff line change 4444 "typescript" : " ^5.7.2"
4545 },
4646 "engines" : {
47- "node" : " >=16.20.2 <=20 "
47+ "node" : " ^22.14.0 "
4848 },
4949 "scripts" : {
5050 "lint" : " eslint '*/**/*.{j,t}s'" ,
Original file line number Diff line number Diff line change 1- version : 1.12.2
1+ version : 1.12.3
You can’t perform that action at this time.
0 commit comments