在Debian环境下利用腾讯云镜像安装docker-ce

参考文章 https://cloud.tencent.com/developer/article/2297462

由于腾讯云镜像网站地址的改变,参考文章中的代码已部份不可用,于是有了这篇关于Debian系统中利用腾讯云镜像源安装docker-ce的文章。

1、安装添加GPG所需的几个依赖包

sudo apt-get -y install --no-install-recommends \
wget gnupg ca-certificates

2、导入GPG公钥,可以按照如下代码导入

wget -O - https://mirrors.tencent.com/docker-ce/linux/debian/gpg | sudo \
apt-key add -

然而,如果使用上面的代码,在更新软件包的时候会报如下警告

W: https://mirrors.tencent.com/docker-ce/linux/debian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

这是因为