From 5d1e88d509195ad23215946c41469da8d9c2ed72 Mon Sep 17 00:00:00 2001 From: The-Foxon Date: Wed, 28 Jun 2023 03:28:32 +1200 Subject: [PATCH] update Dockerfile --- Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbb9224..e3ba653 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,16 @@ FROM node:19-alpine -ENV STORAGE=/app/storage - WORKDIR /app COPY . . -RUN yarn install -RUN yarn build +RUN yarn install && yarn build && rm -rf node_modules -CMD yarn start +FROM node:19-alpine + +ENV STORAGE=/app/storage + +COPY --from=stage0 /app /app + +WORKDIR /app + +CMD yarn start \ No newline at end of file