# --- 网关运行阶段 --- FROM 106.52.199.114:5000/nginx:latest AS gateway # 复制自定义的 Nginx 配置文件 # 假设 Nginx 配置在 gateway 项目的根目录,名为 nginx.conf.gateway COPY nginx.conf.gateway /etc/nginx/nginx.conf # 复制 SSL 证书到 Nginx 容器内 # 假设你的证书在 gateway 项目的 certs/ 文件夹 COPY certs/server.crt /etc/nginx/certs/server.crt COPY certs/server.key /etc/nginx/certs/server.key # 暴露 Nginx 监听的端口 # 在 nginx.conf.gateway 中配置了 8000 和 8001 端口 EXPOSE 8000 EXPOSE 8001 # 启动 Nginx 服务器 CMD ["nginx", "-g", "daemon off;"]