Dockerfile 426 B

1234567891011121314151617181920212223242526
  1. FROM node:16.14.2
  2. LABEL authors="MaxKey <maxkeysupport@163.com>"
  3. WORKDIR /usr/src/app
  4. COPY package.json package.json
  5. RUN npm config set registry https://registry.npm.taobao.org \
  6. && npm i
  7. COPY ./src ./src
  8. RUN npm install -g @angular/cli
  9. RUN ng build --prod
  10. FROM nginx
  11. COPY ./nginx.conf /etc/nginx/conf.d/
  12. RUN rm -rf /usr/share/nginx/html/*
  13. COPY dist /usr/share/nginx/html
  14. #CMD ["nginx", "-g", "daemon off;"]