Skip to content

Commit

Permalink
fix: smaller Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienFaivre committed Jul 19, 2024
1 parent 3b747b3 commit af60876
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
FROM node:latest
FROM node:latest AS build

WORKDIR /app

COPY package.json .
COPY package.json package-lock.json ./

RUN npm install

RUN npm install -g serve

COPY . .

RUN npm run build

FROM node:alpine AS serve

RUN npm install -g serve

COPY --from=build /app/dist /app/dist

WORKDIR /app

ENTRYPOINT ["serve", "-s", "dist"]

0 comments on commit af60876

Please sign in to comment.