File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ lib/state.json
88.eslintrc.json
99test
1010.eslintignore
11+ dist
Original file line number Diff line number Diff line change @@ -3,22 +3,30 @@ RUN adduser --disabled-password -home /home/cfu -shell /bin/bash cfu
33WORKDIR /root/cf-runtime
44COPY package.json yarn.lock ./
55
6- FROM base AS dependencies
6+ FROM base AS build- dependencies
77RUN apt-get update \
88 && apt upgrade -y \
99 && apt-get install -y \
1010 g++ \
1111 git \
1212 make \
1313 python3
14+
15+ FROM build-dependencies AS build
16+ RUN yarn install --frozen-lockfile
17+ COPY . .
18+ RUN yarn build
19+
20+ FROM build-dependencies AS prod-dependencies
1421RUN yarn install --frozen-lockfile --production
1522
1623FROM base AS production
17- COPY --from=dependencies /root/cf-runtime/node_modules ./node_modules
24+ COPY --from=prod-dependencies /root/cf-runtime/node_modules ./node_modules
25+ COPY --from=build /root/cf-runtime/dist ./dist
1826COPY . .
1927
2028# purpose of security
2129RUN npm -g uninstall npm
2230
2331USER cfu
24- CMD ["node" , "lib /index.js" ]
32+ CMD ["node" , "dist /index.js" ]
You can’t perform that action at this time.
0 commit comments