Skip to content

Commit 15712e4

Browse files
committed
Improve docker build
1 parent 9fa1c40 commit 15712e4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ FROM base AS deps
88
# RUN apk add --no-cache libc6-compat
99
WORKDIR /app
1010

11-
# Install dependencies based on the preferred package manager
12-
COPY package.json package-lock.json* .npmrc* source.config.ts ./
13-
14-
# install corepack and enable it
11+
# install and enable corepack
1512
RUN npm install -g corepack@latest
1613
RUN corepack enable
17-
RUN corepack install
1814

15+
# Install dependencies based on the preferred package manager
16+
COPY package.json package-lock.json* .npmrc* source.config.ts ./
17+
RUN corepack install
1918
RUN --mount=type=cache,target=/root/.npm npm ci
2019

2120
# Rebuild the source code only when needed

0 commit comments

Comments
 (0)