Skip to content

Commit

Permalink
[OPTIMIZE] optimize docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ismoilovdevml committed Jan 5, 2024
1 parent 37fc1a6 commit 8492e15
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
FROM node:16
FROM node:16-alpine AS build

WORKDIR /app

COPY package*.json ./

RUN npm install --legacy-peer-deps

COPY . .
RUN npm run build

FROM node:16-alpine

WORKDIR /app

COPY --from=build /app ./

EXPOSE 3000

CMD ["npm", "start"]

0 comments on commit 8492e15

Please sign in to comment.