CentOS7安装Docker Compose

Docker Compose是一个部署多个容器的简单但是非常必要的工具.本次采用 python-pip方式安装Docker Compose

# rpm -q centos-release

centos-release-7-5.1804.5.el7.centos.x86_64

# cat /proc/version

Linux version 3.10.0-693.5.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.80 UTC 2017)

1安装 python-pip

# pip -V

bash: pip: 未找到命令...

# yum install python-pip

# pip install --upgrade pip

再次查看pip

# pip -V

pip 18.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)

2安装Docker Compose

# pip install docker-compose

此时根据报错信息:

ipaclient 4.5.4 requires jinja2, which is not installed.

ipapython 4.5.4 has requirement dnspython>=1.15, but you'll have dnspython 1.12.0 which is incompatible.

安装ipaclient 

# pip install ipaclient

再次安装

# pip install docker-compose

  Found existing installation: requests 2.6.0

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.

此时根据提示安装requests 2.6.0再次报错

docker 3.5.1 has requirement requests!=2.18.0,>=2.14.2, but you'll have requests 2.9.0 which is incompatible.

最后选择安装requests2.16

# pip install -I requests==2.16

3检验docker-compose是否安装成功

# docker-compose --version

 

posted @ 2018-11-13 15:54  etwits  阅读(789)  评论(0编辑  收藏  举报