Files
asset_assistant/frontend/asset-assistant-system/Dockerfile
2025-11-12 17:10:40 +08:00

17 lines
544 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 生产阶段:使用指定版本的 Nginx Alpine 镜像(大小写统一)
FROM nginx:1.29.3-alpine AS production-stage
# 清除 Nginx 默认静态文件
RUN rm -rf /usr/share/nginx/html/*
# 复制项目所有文件到 Nginx 静态文件目录(适配你的项目结构)
COPY . /usr/share/nginx/html
# 复制自定义 Nginx 配置(解决 SPA 路由刷新 404 问题,必须添加)
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
# 暴露 80 端口
EXPOSE 80
# 启动 Nginx前台运行
CMD ["nginx", "-g", "daemon off;"]