添加企业版附加包。python
yum -y install epel-release
安装 PIP。git
yum -y install python-pip
更新 PIP。github
pip install --upgrade pip
安装 Docker Composedocker
pip install docker-compose
在执行 pip install docker-compose
命令的时候可能会提示如下内容:shell
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
这个时候,你须要执行如下命令强制从新安装 request。curl
pip install -I requests==2.9
安装完成以后,Docker-Compose 安装成功。测试
下载最新版的 docker-compose 二进制执行文件。url
sudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
配置可执行权限。code
sudo chmod +x /usr/local/bin/docker-compose
测试是否安装成功。ip
docker-compose --version