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