Skip to content

Commit 1f4a660

Browse files
committed
docker update
1 parent f1340ed commit 1f4a660

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ FROM node:18-alpine3.18 as builder
22
RUN apk add --no-cache git curl
33

44
WORKDIR /builder
5+
6+
COPY package.json yarn.lock ./
7+
RUN npm i -g yarn && yarn install
8+
59
COPY . .
6-
RUN npm i -g yarn
7-
RUN yarn install
810
RUN yarn build
911

12+
13+
1014
# Create image by copying build artifacts
1115
FROM node:18-alpine3.18 as runner
12-
RUN npm i -g yarn
16+
RUN rm -rf /usr/local/bin/yarn && npm i -g yarn --force
1317

1418
USER node
1519
ARG PORT=3000

0 commit comments

Comments
 (0)