From ec689867168f615bdd4a259442fdcb64d90fef8c Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 21 Mar 2025 17:17:31 +0800 Subject: [PATCH] update --- Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 624d3df..52800f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,12 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone -# 备份原始源并使用阿里云镜像源 -RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \ - echo "deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list && \ - echo "deb https://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list && \ - echo "deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list && \ - echo "deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib" >> /etc/apt/sources.list +# 使用阿里云镜像源 +RUN mkdir -p /etc/apt/sources.list.d && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list.d/aliyun.list && \ + echo "deb https://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list.d/aliyun.list && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list.d/aliyun.list && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib" >> /etc/apt/sources.list.d/aliyun.list # 安装构建依赖 RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -58,12 +58,12 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone -# 备份原始源并使用阿里云镜像源 -RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \ - echo "deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list && \ - echo "deb https://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list && \ - echo "deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list && \ - echo "deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib" >> /etc/apt/sources.list +# 使用阿里云镜像源 +RUN mkdir -p /etc/apt/sources.list.d && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list.d/aliyun.list && \ + echo "deb https://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list.d/aliyun.list && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list.d/aliyun.list && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib" >> /etc/apt/sources.list.d/aliyun.list # 安装运行时依赖 RUN apt-get update && apt-get install -y --no-install-recommends \