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

📦 build(docker): 将基础镜像和包源切换至官方源

- 将基础镜像从阿里云私有仓库切换至官方 node:20.19.4-bookworm 镜像
- 将 APT 软件源从清华大学镜像切换至 Debian 官方源 (deb.debian.org, security.debian.org)
- 将 pnpm 的 npm 镜像从 npmmirror.com 切换至官方 registry.npmjs.org
yourname 1 неделя назад
Родитель
Сommit
06a520c2ed
1 измененных файлов с 8 добавлено и 8 удалено
  1. 8 8
      Dockerfile

+ 8 - 8
Dockerfile

@@ -1,11 +1,11 @@
-FROM registry-vpc.cn-beijing.aliyuncs.com/d8dcloud/node:20.19.4-bookworm
+FROM node:20.19.4-bookworm
 
 
-# 清除所有现有的APT源配置
+# 使用官方 Debian APT 源
 RUN rm -rf /etc/apt/sources.list.d/* && \
 RUN rm -rf /etc/apt/sources.list.d/* && \
-    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
+    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
 # 完全禁用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 && \
@@ -17,8 +17,8 @@ RUN apt update --fix-missing && \
 # 安装 pnpm
 # 安装 pnpm
 RUN npm install -g pnpm
 RUN npm install -g pnpm
 
 
-# 配置国内npm镜像
-RUN pnpm config set registry https://registry.npmmirror.com/
+# 配置官方 npm 镜像
+RUN pnpm config set registry https://registry.npmjs.org/
 RUN pnpm config set @jsr:registry https://npm.jsr.io
 RUN pnpm config set @jsr:registry https://npm.jsr.io
 
 
 # 添加PostgreSQL 17的官方仓库(同样禁用验证)
 # 添加PostgreSQL 17的官方仓库(同样禁用验证)