uname -r
sudo apt-get update
sudo apt-get install
sudo apt install curl
sudo apt-get remove docker docker-engine docker.io containerd runc
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0EBFCD88
备用密钥: 9AA38DCD55BE302Bhttps://download.docker.com/linux/ubuntu/gpg
sudo apt-key add /home/package/gpg
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ $(lsb_release -cs) stable"
apt-get install docker-ce docker-ce-cli containerd.io
docker version
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["这里内容自己到自己账号下的阿里云获取路径"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
docker info
sudo systemctl daemon-reload
sudo systemctl restart docker
原文:https://www.cnblogs.com/hi-9527/p/15260641.html