From 8438f2e3840ac795cb1629e7c43ab1717228d46d Mon Sep 17 00:00:00 2001 From: Daniel Kolkena Date: Thu, 26 Oct 2023 08:32:34 -0700 Subject: [PATCH] WIP Multistage Dockerbuild --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 68ce9fd9f9..b8d336ef19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-alpine +FROM node:14-alpine AS builder ENV NODE_OPTIONS=--max-old-space-size=8192 @@ -35,6 +35,13 @@ RUN cd config && npm ci && \ cd ../server && npm ci && \ cd .. +FROM node:14-alpine AS runner + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +COPY --from=builder . . + # Generate schema types for common/ to use RUN cd server && \ npm run generate && \