安装所需软件包sudo yum install -y yum-utils device-mapper-persistent-data lvm2
设定仓库
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装docker
sudo yum install docker-ce
运行docker
systemctl start docker