Skip to content

Commit 1617185

Browse files
committed
fix: replace yarn to pnpm
1 parent beea6bd commit 1617185

File tree

2 files changed

+9
-2789
lines changed

2 files changed

+9
-2789
lines changed

Diff for: Dockerfile.prod2

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
FROM node:18-alpine AS base
22

33
RUN apk add --no-cache libc6-compat
4+
5+
ENV PNPM_HOME="/pnpm"
6+
ENV PATH="$PNPM_HOME:$PATH"
7+
RUN corepack enable
8+
49
WORKDIR /app
510

611
# Install dependencies based on the preferred package manager
7-
COPY package.json yarn.lock ./
8-
RUN yarn global add pnpm && pnpm i --frozen-lockfile
12+
COPY package.json pnpm-lock.yaml* ./
13+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
914
COPY . .
1015

11-
RUN yarn build
16+
RUN pnpm run build
1217

1318
ENV NODE_ENV="production"
1419

1520
EXPOSE 3000
1621

1722
ENV PORT 3000
1823

19-
CMD ["yarn", "start"]
24+
CMD ["pnpm", "start"]

0 commit comments

Comments
 (0)