cleanup docker

This commit is contained in:
cupcakearmy 2022-05-29 00:08:49 +02:00
parent ab609fcb33
commit f89ed1b976
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F

View File

@ -1,19 +1,24 @@
FROM node:16-alpine as builder # BASE
FROM node:16-alpine as base
WORKDIR /app WORKDIR /app
RUN npm -g i pnpm@7
# BUILDER
FROM base as builder
COPY package.json pnpm-lock.yaml ./ COPY package.json pnpm-lock.yaml ./
RUN npm exec pnpm i --frozen-lockfile RUN pnpm i --frozen-lockfile
COPY . . COPY . .
RUN npm exec pnpm run build RUN pnpm run build
RUN ls -hal RUN ls -hal
FROM node:16-alpine # RUNNER
FROM base
WORKDIR /app
COPY package.json pnpm-lock.yaml ./ 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 COPY --from=builder /app/dist ./dist