|
@@ -1,23 +1,18 @@
|
|
|
# 使用指定基础镜像
|
|
# 使用指定基础镜像
|
|
|
|
|
+# 使用指定基础镜像
|
|
|
FROM docker.1ms.run/node:20.19.4-bookworm
|
|
FROM docker.1ms.run/node:20.19.4-bookworm
|
|
|
|
|
|
|
|
-# 设置软件源为清华大学镜像源,并先安装必要的工具
|
|
|
|
|
-RUN 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
|
|
|
|
|
-
|
|
|
|
|
-# 先更新并安装curl(不验证签名),然后添加GPG密钥
|
|
|
|
|
-RUN apt update --allow-unauthenticated --fix-missing && \
|
|
|
|
|
- apt install -y curl wget gnupg
|
|
|
|
|
|
|
+# 直接修改apt配置,完全跳过所有验证
|
|
|
|
|
+RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99unauthenticated
|
|
|
|
|
|
|
|
-# 添加Debian官方GPG密钥
|
|
|
|
|
-RUN wget -qO - https://ftp-master.debian.org/keys/archive-key-$(lsb_release -sr).asc | apt-key add - && \
|
|
|
|
|
- wget -qO - https://ftp-master.debian.org/keys/archive-key-$(lsb_release -sr)-security.asc | apt-key add -
|
|
|
|
|
|
|
+# 设置软件源
|
|
|
|
|
+RUN echo "deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main" > /etc/apt/sources.list && \
|
|
|
|
|
+ echo "deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main" >> /etc/apt/sources.list && \
|
|
|
|
|
+ echo "deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main" >> /etc/apt/sources.list
|
|
|
|
|
|
|
|
-# 现在可以正常更新和安装其他软件
|
|
|
|
|
|
|
+# 现在应该可以正常工作了
|
|
|
RUN apt update --fix-missing && \
|
|
RUN apt update --fix-missing && \
|
|
|
- apt install -y ca-certificates
|
|
|
|
|
|
|
+ apt install -y curl wget
|
|
|
|
|
|
|
|
# 安装 pnpm
|
|
# 安装 pnpm
|
|
|
RUN npm install -g pnpm
|
|
RUN npm install -g pnpm
|