File tree Expand file tree Collapse file tree 2 files changed +15
-20
lines changed Expand file tree Collapse file tree 2 files changed +15
-20
lines changed Original file line number Diff line number Diff line change 1- FROM node:20.8.1 -bookworm-slim
2-
1+ FROM node:20.15.0 -bookworm-slim AS base
2+ RUN adduser --disabled-password -home /home/cfu -shell /bin/bash cfu
33WORKDIR /root/cf-runtime
4-
5- RUN apt-get update && apt upgrade -y && \
6- apt-get install g++ git make python3 -y
7-
84COPY package.json yarn.lock ./
95
10- # install cf-runtime required binaries
11- RUN yarn install --frozen-lockfile --production && \
12- yarn cache clean && \
13- apt-get purge g++ git make python3 -y && \
14- apt-get autoremove -y && \
15- apt-get clean -y && \
16- rm -rf /tmp/* && \
17- rm -rf /var/lib/apt/lists/*
6+ FROM base AS dependencies
7+ RUN apt-get update \
8+ && apt upgrade -y \
9+ && apt-get install -y \
10+ g++ \
11+ git \
12+ make \
13+ python3
14+ RUN yarn install --frozen-lockfile --production
1815
19- # copy app files
20- COPY . ./
21-
22- RUN adduser --disabled-password -home /home/cfu -shell /bin/bash cfu
16+ FROM base AS production
17+ COPY --from=dependencies /root/cf-runtime/node_modules ./node_modules
18+ COPY . .
2319
2420USER cfu
25-
2621CMD ["node" , "lib/index.js" ]
Original file line number Diff line number Diff line change 1- version : 1.11.4
1+ version : 1.11.5
You can’t perform that action at this time.
0 commit comments