Dockerfile

This commit is contained in:
2025-12-03 07:26:15 +00:00
parent 5072683916
commit ce81ff307f

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# 使用官方 Python 运行时作为父镜像
FROM python:3.8-slim
# 设置工作目录
WORKDIR /app
# 将当前目录内容复制到容器内的工作目录
COPY . /app
# 安装依赖
RUN pip install --no-cache-dir Flask
# 定义环境变量
ENV NAME World
# 运行 app.py 当容器启动时
CMD ["python", "./app.py"]