Dockerfile 288 B

123456789101112
  1. FROM node:14.15.1 AS base
  2. WORKDIR /code
  3. RUN yarn config set registry https://registry.npm.taobao.org/
  4. ADD package.json /code
  5. RUN yarn install
  6. ADD . /code
  7. RUN yarn build
  8. FROM nginx:1.19-alpine
  9. COPY nginx.conf /etc/nginx/conf.d/nginx.conf
  10. COPY --from=base /code/dist /var/www/html/dist/