File tree 4 files changed +13
-13
lines changed
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
5
4
6
5
FROM base AS build-dependencies
7
6
RUN apt-get update \
@@ -11,6 +10,7 @@ RUN apt-get update \
11
10
git \
12
11
make \
13
12
python3
13
+ COPY package.json yarn.lock ./
14
14
15
15
FROM build-dependencies AS build
16
16
RUN yarn install --frozen-lockfile
@@ -20,12 +20,12 @@ RUN yarn build
20
20
FROM build-dependencies AS prod-dependencies
21
21
RUN yarn install --frozen-lockfile --production
22
22
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
26
27
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
29
30
30
- USER cfu
31
31
CMD ["node" , "lib/index.js" ]
Original file line number Diff line number Diff line change 44
44
"typescript" : " ^5.7.2"
45
45
},
46
46
"engines" : {
47
- "node" : " >=16.20.2 <=20 "
47
+ "node" : " ^22.14.0 "
48
48
},
49
49
"scripts" : {
50
50
"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