diff --git a/Dockerfile b/Dockerfile index bd7286f..64eb5cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# 使用Python 3.11官方镜像作为基础镜像 -FROM python:3.11-slim +# 使用Python 3官方镜像(自动使用最新稳定版本,匹配本机Python版本) +FROM python:3-slim # 设置工作目录 WORKDIR /app @@ -45,4 +45,3 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ # 使用gunicorn启动应用(生产环境) CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "web_app:app"] - diff --git a/Dockerfile.dev b/Dockerfile.dev index 2a7670a..c054627 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # 开发环境Dockerfile -FROM python:3.11-slim +FROM python:3-slim WORKDIR /app