1获取官方源
[root@localhost ~]# wget -P /etc/yum.repos.d/ https://download.docker.com/linux/centos/docker-ce.repo
2安装
yum install -y docker-ce
#报错
root@localhost ~]# yum install --allowerasing docker-ce
3配置国内镜像仓库
[root@localhost ~]# vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com"
]
}
#启动
systemctl start docker
systemctl enable docker
#查看效果
[root@localhost ~]# docker info