示例文件
## 别名 ui-build
FROM node:10 AS ui-build
WORKDIR /usr/src/app
COPY WebApp/ ./WebApp/
RUN cd WebApp && npm install @angular/cli && npm install && npm run build
FROM node:10 AS server-build
WORKDIR /root/
## 从 ui-build:/usr/src/app/WebApp/dist 复制到 server-build:./WebApp/dist
COPY --from=ui-build /usr/src/app/WebApp/dist ./WebApp/dist
COPY package*.json ./
RUN npm install
COPY index.js .
EXPOSE 3070
ENTRYPOINT ["node"]
CMD ["index.js"]