This commit is contained in:
aaron 2025-03-21 22:53:55 +08:00
parent 94c741b024
commit 6ba4b989f7

View File

@ -30,6 +30,23 @@ FROM python:3.9-slim
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 清空所有默认源
RUN rm -rf /etc/apt/sources.list.d/* && \
rm -f /etc/apt/sources.list
# 替换为阿里云源
RUN echo "\
deb https://mirrors.aliyun.com/debian/ bookworm main non-free-firmware contrib\n\
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free-firmware contrib\n\
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free-firmware contrib\n\
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free-firmware contrib\n\
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free-firmware contrib\n\
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free-firmware contrib\n\
deb https://mirrors.aliyun.com/debian-security bookworm-security main non-free-firmware contrib\n\
deb-src https://mirrors.aliyun.com/debian-security bookworm-security main non-free-firmware contrib\n\
" > /etc/apt/sources.list
# 安装运行时依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \