Skip to content

Commit

Permalink
reduce the size of the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Oct 27, 2023
1 parent 3bae533 commit abd8c32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit abd8c32

Please sign in to comment.