From 400503455b4220b046437b0a740c0352405e77c6 Mon Sep 17 00:00:00 2001 From: Gzs2406 <2069733833@qq.com> Date: Fri, 3 Jan 2025 15:41:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..74c1399 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.12 + +# 设置工作目录 +WORKDIR /app + +# 将当前目录内容复制到位于容器的/app目录下 +COPY . /app + +# 安装依赖 +RUN pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple +RUN pip install --no-cache-dir -r requirements.txt + +# 暴露容器的端口 +EXPOSE 8000 + +# 在容器启动时运行app.py +CMD ["python", "main.py"]