添加企業版附加包。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