FROM node:10 as build-stage WORKDIR /app COPY package*.json ./ RUN npm set strict-ssl false RUN npm config set registry http://registry.npm.taobao.org RUN npm install COPY . . RUN npm run build # production stage FROM nginx:1.13.12-alpine as production-stage RUN mkdir /usr/share/nginx/html/monitor COPY --from=build-stage /app/dist /usr/share/nginx/html/monitor EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]