Dockerfile 多段构建
程序员文章站
2022-07-14 10:28:08
...
FROM node AS stage
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build:prod
FROM nginx
WORKDIR /usr/share/nginx/html
COPY --from=stage /app/dist/frontendDemo .
EXPOSE 80