Skip to content

Commit 476a72c

Browse files
committed
got dockerfile to not error at least
1 parent fa7874a commit 476a72c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Stage 1: Build
2-
FROM node:21.2.0-alpine as build
2+
FROM node:21.2.0-alpine AS build
33

44
# python: required dependency for node alpine, shrinks image size from 2.17GB to 1.67GB
55
RUN apk add --no-cache --virtual .gyp \
66
python3 \
77
make \
88
g++
99

10+
RUN npm install -g [email protected]
11+
1012
WORKDIR /app
1113

1214
COPY package*.json ./
@@ -16,21 +18,21 @@ RUN npm install --no-install-recommends --fetch-retry-maxtimeout 500000
1618
COPY . .
1719

1820
# Stage 2: Runtime
19-
FROM node:21.2.0-alpine as runtime
21+
FROM node:21.2.0-alpine AS runtime
2022

2123
WORKDIR /app
2224

2325
COPY --from=build /app/package*.json ./
2426

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
2729
# COPY --from=build /app/.env .env
2830
COPY --from=build /app/config.js ./config.js
2931
COPY --from=build /app/server ./server
3032
COPY --from=build /app/build /app
3133

3234
EXPOSE 5656
3335

34-
ENV IS_DOCKER true
36+
ENV IS_DOCKER=true
3537

3638
CMD [ "npm", "start" ]

0 commit comments

Comments
 (0)