Dockerfile 507 B

1234567891011121314151617181920212223242526272829
  1. #MaxKey Frontend Docker Build
  2. FROM node:16.14.2
  3. LABEL authors="MaxKey <support@maxsso.net>"
  4. WORKDIR /usr/src/app
  5. COPY package.json package.json
  6. RUN npm config set registry https://registry.npm.taobao.org \
  7. && npm i
  8. COPY ./src ./src
  9. RUN npm install -g @angular/cli
  10. RUN ng build --prod --base-href /maxkey/
  11. FROM nginx
  12. COPY ./nginx.conf /etc/nginx/conf.d/default.conf
  13. #RUN rm -rf /usr/share/nginx/html/*
  14. COPY dist /usr/share/nginx/html/maxkey
  15. #CMD ["nginx", "-g", "daemon off;"]
  16. EXPOSE 8527