安装docker-ce
1. 安装管理工具包
yum -y install yum-utils device-mapper-persistent-data lvm2
2. 配置国内镜像源
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3.安装docker-ce
yum -y install docker-ce-18.06.2.ce
4.配置开机自启动
systemctl enable docker
systemctl start docker
5.配置国内镜像仓库
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://at9x0hav.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker