File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ lib/state.json
8
8
.eslintrc.json
9
9
test
10
10
.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
3
3
WORKDIR /root/cf-runtime
4
4
COPY package.json yarn.lock ./
5
5
6
- FROM base AS dependencies
6
+ FROM base AS build- dependencies
7
7
RUN apt-get update \
8
8
&& apt upgrade -y \
9
9
&& apt-get install -y \
10
10
g++ \
11
11
git \
12
12
make \
13
13
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
14
21
RUN yarn install --frozen-lockfile --production
15
22
16
23
FROM 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
18
26
COPY . .
19
27
20
28
# purpose of security
21
29
RUN npm -g uninstall npm
22
30
23
31
USER 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