#先更新yum庫python
sudo yum updatelinux
#安裝相關依賴包docker
sudo yum install -y libcgroupcentos
sudo yum install -y policycoreutils-pythondate
sudo yum install -y libtool-ltdlyum
#安裝docker-engine-selinuxco
sudo rpm -ivh docker-engine-selinux-1.11.1-1.el7.centos.noarch.rpmsudo
#安裝docker-engineab
sudo rpm -ivh docker-engine-1.11.1-1.el7.centos.x86_64.rpmtar
#啓動docker服務
sudo systemctl start docker
#加入開機啓動項
sudo systemctl enable docker