Dockerfile 398 B

1234567891011121314
  1. FROM node:lts-alpine as build-stage
  2. MAINTAINER fanyanpeng fanyanpeng@smail.nju.edu.cn
  3. WORKDIR /app
  4. ENV TZ Asia/Shanghai
  5. COPY package*.json ./
  6. RUN npm config set registry https://mirrors.cloud.tencent.com/npm/
  7. RUN npm install
  8. COPY . .
  9. RUN npm run build
  10. FROM nginx:stable-alpine as production-stage
  11. COPY --from=build-stage /app/dist /usr/share/nginx/html
  12. EXPOSE 80
  13. CMD ["nginx", "-g", "daemon off;"]