yum安装docker
yum install docker
配置镜像加速器与数据存储位置
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://d2sw0alz.mirror.aliyuncs.com"],
"graph":"/file/docker/data"
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
开机自动启动
systemctl enable docker.service