From 6e6be70eb870021183a555c31896bdbc5161d511 Mon Sep 17 00:00:00 2001 From: aszerW Date: Sun, 26 Oct 2025 16:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E9=95=9C=E5=83=8F=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=AF=8F=E6=AC=A1=E9=87=8D=E6=89=93=E8=80=97?= =?UTF-8?q?=E6=97=B6=20docker=20build=20-f=20Dockerfile=5Fbase=20-t=20inde?= =?UTF-8?q?x-base:latest=20--platform=20linux/arm64=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile_base | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Dockerfile_base diff --git a/Dockerfile_base b/Dockerfile_base new file mode 100644 index 0000000..0716331 --- /dev/null +++ b/Dockerfile_base @@ -0,0 +1,31 @@ +FROM python:3.12-slim + +# 设置工作目录 +WORKDIR /app + +RUN apt-get update && \ + apt-get install -y --no-install-recommends tzdata && \ + ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + dpkg-reconfigure -f noninteractive tzdata && \ + rm -rf /var/lib/apt/lists/* + +RUN pip install uv \ + && rm -rf /root/.cache/pip + +ENV UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple + +# 复制依赖文件 +COPY requirements.txt . + +# 配置清华源并安装 Python 依赖 +# RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ +# pip install --only-binary=all --no-cache-dir -r requirements.txt + +RUN uv pip install --system -r requirements.txt + + +# 暴露端口 +EXPOSE 80 + +# 运行应用 +# CMD ["python", "update_data.py"] \ No newline at end of file