1.卸载过去的版本 yum remove docker docker-common docker-selinux docker-engine 2.安装docker所需插件: yum install -y yum-utils device-mapper-persistent-data lvm2 3. yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
若是报上面的错就执行:yum install epel-release -y 4.安装最新版本的Docker CE yum install docker-ce -y
使用阿里云docker仓库 vim /etc/docker/daemon.json { "registry-mirrors": ["https://pee6w651.mirror.aliyuncs.com"] } 注意须要同步服务器时间: ntpdate -u ntp.aliyun.com