FROM nginx:latest # 修改默认监听端口为 7860 RUN sed -i 's/listen\s*80;/listen 7860;/g' /etc/nginx/conf.d/default.conf # 暴露容器的 7860 端口 EXPOSE 7860 # 启动 Nginx CMD ["nginx", "-g", "daemon off;"]