feat: "modernise" Docker image and use alpine

This commit is contained in:
Paul Makles
2022-04-29 16:17:31 +01:00
parent f3cf4f01ca
commit b2a9cfd987
6 changed files with 89 additions and 30 deletions

View File

@@ -1,18 +1,15 @@
FROM node:16-buster AS builder
WORKDIR /usr/src/app
COPY package*.json ./
RUN yarn --no-cache
COPY . .
COPY .env.build .env
RUN yarn add --dev @babel/plugin-proposal-decorators
RUN yarn install --frozen-lockfile
RUN yarn typecheck
RUN yarn build:highmem
RUN npm prune --production
RUN yarn workspaces focus --production --all
FROM node:16-buster
FROM node:16-alpine
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app .