Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
make the docker image a bit smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
kclejeune committed Sep 4, 2021
1 parent 9f41df8 commit 2cba24d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
FROM node:lts-alpine AS build
WORKDIR /app
COPY package*.json .
RUN npm ci --no-audit

COPY . .
RUN npm ci
RUN npm run build
RUN npm ci --production --no-audit

FROM node:lts-alpine AS deploy
WORKDIR /app
COPY --from=build /app .
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/build ./build
COPY --from=build /app/svelte.config.js .
COPY --from=build /app/package.json .

ENV PORT=3000
EXPOSE $PORT
CMD [ "node", "./build" ]

0 comments on commit 2cba24d

Please sign in to comment.