Skip to content

Commit

Permalink
fix: use multi-staged build for clean frontend image
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalinDe committed Sep 8, 2023
1 parent d9da80d commit 2d4ecc6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfiles/Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
FROM node:20-bookworm
FROM node:20-bookworm as build

ENV REACT_APP_PROXY=http://localhost:9081
ENV REACT_APP_NOMOCK=on
WORKDIR /web/frontend
COPY ../web/frontend .
RUN npm install
RUN npm ci
RUN npm run build

FROM node:20-bookworm as app

COPY --from=build /web/frontend/ .

ENTRYPOINT ["npm", "start"]

0 comments on commit 2d4ecc6

Please sign in to comment.