导入 gpg 密钥
apt update
apt install -y gpg curl
export LC_CTYPE=C.UTF-8
export LANG=C.UTF-8
gpg --keyserver keys.openpgp.org --recv-keys FCF8724722CCBF9F51B1FBE376532BE7E3013105
mkdir -p /usr/share/keyrings/
gpg --armor --export FCF8724722CCBF9F51B1FBE376532BE7E3013105 > /usr/share/keyrings/docker-archive-keyring.gpg
配置源
cat > /etc/apt/sources.list.d/docker.list << EOF
deb [arch=loong64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] http://mirrors.xuxiaowei.com.cn:50000/service/rest/repository/browse/docker-ce/linux/debian/ trixie main
EOF
无法更新
提示信息代表无法正常访问
apt update
查看 apt 更新失败日志:
由于没有配置凭证,默认使用 OAuth 2 authorization_code 协议
apt -o Debug::Acquire::http=true update
配置凭证
machine <地址> login <固定值 token(或不为空即可)> password <填写 gitlab.xuxiaowei.com.cn Token(权限:read_api)>
root@0efaafa51d99:/# cat /etc/apt/auth.conf
machine http://47.104.195.198:50000 login token password glpat-xxxxxx
root@0efaafa51d99:/#
凭证已过期、无效
提示 401
更新成功
apt update
查看 apt 更新成功日志
apt -o Debug::Acquire::http=true update
尝试安装
apt install containerd docker-ce docker-ce-cli docker-compose-plugin docker-buildx-plugin docker-init runc





