前置依赖安装
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
导入源仓库的 GPG key
curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
apt添加docker的源
sudo add-apt-repository "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
安装docker
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
预览: