(1)查看现有的Docker环境yum list installed | grep docker
(2)卸载现有的Docker环境 yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
(3)设置本地源 yum install -y yum-utilsyum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
(4)安装Docker yum install docker-ce -y
(5)镜像加速配置 mkdir -p /etc/dockertee /etc/docker/daemon.json <<-'EOF'{ "registry-mirrors": ["https://e3r7iyl5.mirror.aliyuncs.com"]}EOFsudo systemctl daemon-reload
(6)启动Docker systemctl restart docker