Skip to content

Commit

Permalink
chore(frontend): make Dockerfile multistage (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adibov authored Dec 4, 2023
1 parent 4c10930 commit 34bfb64
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM node:18.18.0
FROM node:18.18.0 AS build

WORKDIR /run

COPY package*.json .
RUN npm install

COPY . .
CMD npm run build
RUN npm run build

FROM alpine:3.17.6 AS production

WORKDIR /run
COPY --from=build /run/dist /dist
CMD cp -r /dist /run/dist

0 comments on commit 34bfb64

Please sign in to comment.