From 0a111324db632e424cda94311583272f2ad683ab Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Tue, 1 Nov 2022 14:00:42 +0530 Subject: [PATCH] fix dockerfile for wrong lock file copy --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14f6d3e..45c1672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,25 @@ -FROM node:18-alpine AS builder +FROM node:18-alpine AS pnpm + +RUN npm i -g pnpm + +FROM pnpm AS builder WORKDIR "/app" COPY . . -RUN npm i -g pnpm - RUN pnpm i RUN pnpm build RUN pnpm prune --production -FROM node:18-alpine AS prod +FROM pnpm AS prod WORKDIR "/app" COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/package-lock.json ./package-lock.json +COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml COPY --from=builder /app/dist ./dist COPY --from=builder /app/node_modules ./node_modules