从index-base:latest镜像开始重新打

This commit is contained in:
2025-10-26 16:39:21 +08:00
parent 6e6be70eb8
commit 5ccf1523d7

View File

@@ -1,26 +1,11 @@
FROM python:3.12-slim
FROM index-base:latest
# 设置工作目录
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
# 仅复制除 data 目录外的应用代码