Skip to content

Commit ff24fa9

Browse files
committed
chore: fix dockerfile with pnpm
1 parent 327af93 commit ff24fa9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
.git
12
node_modules
23
.vscode
34
.idea
45
dist
56
/cli
7+
docs/.vitepress/cache

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# build stage
2-
FROM node:17 as build
2+
FROM node:18 as build
33

44
WORKDIR /app
5-
COPY package*.json ./
6-
RUN npm ci
5+
6+
# install pnpm as defined in package.json
7+
COPY pnpm-lock.yaml package.json ./
8+
RUN npm i -g $(node -p "require('./package.json').packageManager")
9+
10+
RUN pnpm install --frozen-lockfile
711

812
COPY . ./
9-
RUN npm run docs:build
13+
RUN pnpm docs:build
1014

1115
# production stage
1216
FROM nginx:stable-alpine

0 commit comments

Comments
 (0)