CentOS 7.x 安装 Docker-Compose


  1. 添加企业版附加包。

    yum -y install epel-release
  2. 安装 PIP。

    yum -y install python-pip
  3. 更新 PIP。

    pip install --upgrade pip
  4. 安装 Docker Compose

    pip install docker-compose


在执行 pip install docker-compose 命令的时候可能会提示以下内容:

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。

pip install -I requests==2.9

安装完成之后,Docker-Compose 安装成功。