flow-doc-deleted/Dockerfile

20 lines
454 B
Docker
Raw Permalink Normal View History

FROM registry.cn-hangzhou.aliyuncs.com/idmesh/base:flow-doc-base-v1 as build
WORKDIR /app
COPY . .
# 构建 React 项目
RUN npm run docs:build
FROM nginx:latest
# 复制 React 项目构建结果到 Nginx 的默认静态文件目录
COPY --from=build /app/docs/.vuepress/dist /usr/share/nginx/html
COPY --from=build /app/nginx.conf /etc/nginx/nginx.conf
# 暴露 Nginx 默认端口
EXPOSE 80
# Nginx 启动命令
CMD ["nginx", "-g", "daemon off;"]