Skip to content

Commit fc5b479

Browse files
CopilotneSpecc
andcommitted
Fix Docker build by installing devDependencies in builder stage
Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com>
1 parent 7c2a625 commit fc5b479

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

docker/Dockerfile.prod

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN apk add --no-cache git gcc g++ python3 make musl-dev
55

66
COPY package.json yarn.lock ./
77

8-
RUN yarn install --prod
8+
RUN yarn install
99

1010
COPY . .
1111

@@ -14,12 +14,15 @@ RUN yarn build
1414
FROM node:16-alpine
1515

1616
WORKDIR /usr/src/app
17+
RUN apk add --no-cache git gcc g++ python3 make musl-dev
18+
19+
COPY package.json yarn.lock ./
20+
21+
RUN yarn install --prod
1722

1823
COPY --from=builder /usr/src/app/build ./
19-
COPY --from=builder /usr/src/app/node_modules ./node_modules
2024
COPY ./migrations/ ./migrations/
2125
COPY ./static/ ./static/
2226
COPY migrate-mongo-config.js ./
23-
COPY package.json ./
2427

2528
CMD ["node", "index.js"]

0 commit comments

Comments
 (0)