chore: update Dockerfile to use python:3-slim for compatibility

This commit is contained in:
赵杰 Jie Zhao (雄狮汽车科技)
2025-11-03 00:02:53 +08:00
parent 2ab6aafc6f
commit 8b99272711
2 changed files with 3 additions and 4 deletions

View File

@@ -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"]

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# 开发环境Dockerfile
FROM python:3.11-slim
FROM python:3-slim
WORKDIR /app