1.安装依赖yum install -y yum-utils

2.设置远程镜像yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3.安装yum install docker-ce

4.查看版本docker version

5.设置开机自启动chkconfig docker on或者systemctl start docker

6.docker run hello-word测试