docker搭建
1.安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的
sudo yum install -y yum-utils device-mapper-persistent-data
2.设置yum源
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3.安装docker
sudo yum install docker-ce
4.启动和加入开机启动
sudo systemctl start docker
sudo systemctl enable docker