change to the root user
sudo -i
update the apt-get
apt-get update
apt-get upgrade
install the dependencies of docker
apt-get install ca-certificates curl gnupg lsb-release
config the key of aliyun
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
change the soure
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
install docker
apt-get install docker-ce docker-ce-cli containerd.i
config the source of docker
mkdir /etc/docker
cat > /etc/docker/daemon.json << EOF
{
"registry-mirrors": [
"https://hub.uuuadc.top",
"https://docker.anyhub.us.kg",
"https://dockerhub.jobcher.com",
"https://dockerhub.icu",
"https://docker.ckyl.me",
"https://docker.awsl9527.cn"
]
}
EOF
restart
systemctl daemon-reload
systemctl restart docker
Enjoy it !
https://blog.csdn.net/m0_51964671/article/details/135411448