yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
mkdir -p /etc/docker && tee /etc/docker/daemon.json <<EOF
{
"registry-mirrors":
["https: // g2gr04ke .mirror.aliyuncs.com"],
"exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
systemctl start docker
systemctl daemon-reload
systemctl enable