Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dong2ast authored Jan 11, 2024
1 parent 2f68e1e commit 495f5de
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
FROM node:18.17.0-slim
FROM node:18.17.0-slim as builder

WORKDIR /app

COPY package.json .
COPY yarn.lock .

RUN yarn
RUN yarn install

COPY . .

CMD ["yarn", "dev"]
RUN yarn run build

FROM node:18.17.0-slim

WORKDIR /app

# build 폴더 복사 , 다른 phase 에서 가져옴
COPY --from=builder /app/build ./builder
RUN npm install -g serve

CMD ["serve", "-s", "build"]

0 comments on commit 495f5de

Please sign in to comment.