拥有root权限的用户。
$ uname -r
$ sudo yum update
$ sudo vim /etc/yum.repos.d/docker.repo
## 在vim编辑器中输入以下内容后保存
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
$ sudo yum install docker-engine
sudo systemctl start docker.service
$ docker --version
$ yum -y install epel-release
$ yum -y install python-pip
$ pip install --upgrade pip
$ pip install docker-compose
$ docker-compose --version