Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed May 1, 2020
1 parent 687dbb6 commit 0b5a458
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
FROM node:12-alpine
FROM node:12-alpine as builder

LABEL com.yanceyleo.maintainer="Yancey Inc. <yanceyofficial@gmail.com>" \
com.yanceyleo.version="1.1.0" \
com.yanceyleo.release-date="2020-05-01"

WORKDIR /usr/src/app

COPY package*.json /usr/src/app
COPY package*.json ./

RUN yarn install

COPY . .

RUN yarn build

COPY /usr/src/app/dist ./dist

FROM node:12-alpine

WORKDIR /usr/src/app

COPY --from=builder /usr/src/app/package*.json ./

RUN yarn install --only=production

COPY . .

COPY --from=builder /usr/src/app/dist ./dist

EXPOSE 3002

Expand Down

0 comments on commit 0b5a458

Please sign in to comment.