use corepack to install pnpm, over regular method

This commit is contained in:
Amruth Pillai
2023-04-06 13:08:51 +02:00
parent 7348b295cb
commit 5486906b05
2 changed files with 4 additions and 4 deletions

View File

@ -2,8 +2,8 @@ FROM node:lts-alpine AS base
WORKDIR /app
RUN apk add --no-cache g++ git curl make python3 libc6-compat \
&& curl -fsSL https://get.pnpm.io/install.sh | node - add --global pnpm
RUN apk add --no-cache g++ git make curl python3 libc6-compat \
&& corepack enable && corepack prepare pnpm@latest --activate
FROM base as dependencies

View File

@ -3,7 +3,7 @@ FROM node:lts-alpine AS base
WORKDIR /app
RUN apk add --no-cache g++ git curl make python3 libc6-compat \
&& curl -fsSL https://get.pnpm.io/install.sh | node - add --global pnpm
&& corepack enable && corepack prepare pnpm@latest --activate
FROM base AS dependencies
@ -29,7 +29,7 @@ WORKDIR /app
RUN apt-get update \
&& apt-get install -y curl build-essential \
&& curl -fsSL https://get.pnpm.io/install.sh | node - add --global pnpm
&& corepack enable && corepack prepare pnpm@latest --activate
COPY --from=builder /app/package.json /app/pnpm-*.yaml ./
COPY --from=builder /app/server/package.json ./server/package.json