From ce81ff307fc330bd942f2e6f71c3df9693aff7c9 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 3 Dec 2025 07:26:15 +0000 Subject: [PATCH] Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6436cae --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file