build(dockerfile): replace yarn with pnpm

This commit is contained in:
zyachel 2023-01-28 22:08:28 +05:30
parent 68072b5f68
commit 20418b4c1f

View file

@ -4,8 +4,8 @@
FROM node:lts-alpine AS deps
WORKDIR /opt/app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Rebuild the source code only when needed
# This is where because may be the case that you would try
@ -17,7 +17,7 @@ ENV NODE_ENV=production
WORKDIR /opt/app
COPY . .
COPY --from=deps /opt/app/node_modules ./node_modules
RUN yarn build
RUN pnpm build
# Production image, copy all the files and run next
FROM node:lts-alpine AS runner