Dockerfile 594 B

12345678910111213141516171819202122
  1. FROM registry.cn-shanghai.aliyuncs.com/lwmeng/node:lts-alpine as build-stage
  2. WORKDIR /app
  3. COPY package*.json ./
  4. RUN npm install -g cnpm --registry=https://registry.npmmirror.com
  5. RUN cnpm install
  6. COPY . .
  7. <<<<<<< HEAD
  8. RUN npm run build:prod
  9. =======
  10. RUN npm run build
  11. >>>>>>> c783a6ef305ea32ac430b5826a7a13ab5898515d
  12. # production stage
  13. FROM registry.cn-shanghai.aliyuncs.com/lwmeng/nginx
  14. COPY --from=build-stage /app/dist /usr/share/nginx/html
  15. EXPOSE 80
  16. <<<<<<< HEAD
  17. CMD ["nginx", "-g", "daemon off;"]
  18. =======
  19. CMD ["nginx", "-g", "daemon off;"]
  20. >>>>>>> c783a6ef305ea32ac430b5826a7a13ab5898515d