yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
vi /etc/docker/daemon.json
{
"registry-mirrors": [
"http://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com",
"http://registry.docker-cn.com"
]
}
systemctl restart docker