修复python镜像路径

This commit is contained in:
lhx
2025-09-27 14:40:25 +08:00
parent a3f935df2a
commit 247bb71d55

View File

@@ -1,5 +1,4 @@
# 使用官方Python运行时作为基础镜像
FROM python:3.11-slim
FROM python:3.11-buster
# 设置工作目录
WORKDIR /app
@@ -8,12 +7,6 @@ WORKDIR /app
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
# 配置国内镜像源加速
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list && \
apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# 设置pip国内镜像源
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple