From f89ed1b9769f34ba068ba83330ede52b825db1ee Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 29 May 2022 00:08:49 +0200 Subject: [PATCH] cleanup docker --- Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8912cb..73bf450 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,24 @@ -FROM node:16-alpine as builder +# BASE +FROM node:16-alpine as base WORKDIR /app +RUN npm -g i pnpm@7 + +# BUILDER +FROM base as builder COPY package.json pnpm-lock.yaml ./ -RUN npm exec pnpm i --frozen-lockfile +RUN pnpm i --frozen-lockfile COPY . . -RUN npm exec pnpm run build +RUN pnpm run build RUN ls -hal -FROM node:16-alpine +# RUNNER +FROM base -WORKDIR /app COPY package.json pnpm-lock.yaml ./ -RUN npm exec pnpm i --frozen-lockfile --prod +RUN pnpm install --frozen-lockfile --prod COPY --from=builder /app/dist ./dist