Dockerfile 317 B

123456789101112
  1. FROM node:16 as builder
  2. WORKDIR /code
  3. RUN yarn config set registry https://repo.nju.edu.cn/repository/npm/
  4. RUN yarn config set network-timeout 60000
  5. ADD package.json /code
  6. ADD yarn.lock /code
  7. RUN yarn install
  8. ADD . /code
  9. RUN yarn build:prod
  10. FROM nginx:1.19-alpine
  11. COPY --from=builder /code/dist/ /var/www/html/dist/