From abd8c323cb92fb1e69a53957f408f382d6aca47b Mon Sep 17 00:00:00 2001 From: Mat Sz Date: Fri, 27 Oct 2023 18:34:15 +0200 Subject: [PATCH] reduce the size of the docker image --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8e495fd..09df811 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,10 @@ ENV PATH /app/node_modules/.bin:$PATH COPY . /app RUN apk add --no-cache bash -RUN corepack yarn install && corepack yarn build && corepack yarn cache clean +RUN corepack yarn install && corepack yarn build && mv web/build web_build && rm -rf web && rm -rf node_modules && corepack yarn cache clean && rm -rf /root/.npm +RUN corepack yarn install && corepack yarn cache clean && rm -rf /root/.npm EXPOSE 5000 +ENV WS_STATIC_ROOT ../web_build CMD ["corepack", "yarn", "start:prod"]