feat: 新增 python310-flask 构建示例(demo/python310-flask)

This commit is contained in:
2026-06-13 21:47:15 +08:00
parent 6af17a9d4f
commit c732877fd8
11 changed files with 247 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# 单阶段:runtime-python310 已含 Python 3.10.0 + pip 镜像源(见 image/runtime-python310),编译与运行共用
FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-python310
LABEL MAINTAINER="tianjun@odboy.cn"
ENV TimeZone=Asia/Shanghai
ENV PYTHONUNBUFFERED=1
ENV APP_PORT=8083
WORKDIR /home/admin
# 先只拷贝依赖清单,依赖不变时复用 pip 层缓存
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
COPY app.py ./
COPY templates ./templates
EXPOSE 8083
# exec 形式,保证 docker stop 的 SIGTERM 能传到 python 进程
ENTRYPOINT ["python3", "app.py"]