From 8b99272711d9f2f9cfc7acc5033616bfcf014ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=9D=B0=20Jie=20Zhao=20=EF=BC=88=E9=9B=84?= =?UTF-8?q?=E7=8B=AE=E6=B1=BD=E8=BD=A6=E7=A7=91=E6=8A=80=EF=BC=89?= <00061074@chery.local> Date: Mon, 3 Nov 2025 00:02:53 +0800 Subject: [PATCH] chore: update Dockerfile to use python:3-slim for compatibility --- Dockerfile | 5 ++--- Dockerfile.dev | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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