File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Stage 1: Build
2
- FROM node:21.2.0-alpine as build
2
+ FROM node:21.2.0-alpine AS build
3
3
4
4
# python: required dependency for node alpine, shrinks image size from 2.17GB to 1.67GB
5
5
RUN apk add --no-cache --virtual .gyp \
6
6
python3 \
7
7
make \
8
8
g++
9
9
10
+ RUN npm install -g
[email protected]
11
+
10
12
WORKDIR /app
11
13
12
14
COPY package*.json ./
@@ -16,21 +18,21 @@ RUN npm install --no-install-recommends --fetch-retry-maxtimeout 500000
16
18
COPY . .
17
19
18
20
# Stage 2: Runtime
19
- FROM node:21.2.0-alpine as runtime
21
+ FROM node:21.2.0-alpine AS runtime
20
22
21
23
WORKDIR /app
22
24
23
25
COPY --from=build /app/package*.json ./
24
26
25
- RUN npm install --no-install-recommends --only=production -- fetch-retry-maxtimeout 500000
26
-
27
+ RUN npm install --no-install-recommends --fetch-retry-maxtimeout 500000
28
+ # --only=prod
27
29
# COPY --from=build /app/.env .env
28
30
COPY --from=build /app/config.js ./config.js
29
31
COPY --from=build /app/server ./server
30
32
COPY --from=build /app/build /app
31
33
32
34
EXPOSE 5656
33
35
34
- ENV IS_DOCKER true
36
+ ENV IS_DOCKER= true
35
37
36
38
CMD [ "npm" , "start" ]
You can’t perform that action at this time.
0 commit comments