Просмотр исходного кода

📦 build(docker): 更新Docker基础镜像的APT源配置

- 将APT源从官方Debian仓库切换为清华大学镜像站以提升国内构建速度
- 更新所有源配置行,统一使用`mirrors.tuna.tsinghua.edu.cn`域名
- 保持原有的APT非安全验证配置不变
yourname 1 неделя назад
Родитель
Сommit
a9bd72b602
1 измененных файлов с 6 добавлено и 5 удалено
  1. 6 5
      Dockerfile

+ 6 - 5
Dockerfile

@@ -1,11 +1,12 @@
 FROM node:20.19.4-bookworm
 FROM node:20.19.4-bookworm
 
 
-# 使用官方 Debian APT 源
+# 清除所有现有的APT源配置
 RUN rm -rf /etc/apt/sources.list.d/* && \
 RUN rm -rf /etc/apt/sources.list.d/* && \
-    echo "deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
-    echo "deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
-    echo "deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
-    echo "deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list
+    echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
+    echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
+    echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
+    echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list
+
 # 完全禁用APT的GPG验证
 # 完全禁用APT的GPG验证
 RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated && \
 RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated && \
     echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99allow-unauthenticated && \
     echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99allow-unauthenticated && \