删除旧docker

yum remove docker docker-common docker-client docker-compose


增加docker-repo
[docker-main]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

[docker-testing]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/testing/centos/$releasever/
enabled=0
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

[docker-beta]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/beta/centos/7/
enabled=0
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

[docker-nightly]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/nightly/centos/7/
enabled=0
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg


安装docker
yum install docker-engine