dockerfile from as
dockerfile from as
https://juejin.cn/s/dockerfile%20from%20as
Demo
https://github.com/andreaskring/fastapi-keycloak-angular
分离构建镜像和运行镜像
FROM node:current-alpine as build WORKDIR /app COPY ./angular/package.json ./ COPY ./angular/package-lock.json ./ RUN npm install COPY ./angular ./ RUN npm run build FROM nginx COPY ./angular/nginx.conf /etc/nginx/conf.d/angular.conf COPY --from=build /app/dist/angular /usr/share/nginx/html
出处:http://www.cnblogs.com/lightsong/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。