CentOS7安装Docker Compose

DockerCompose安装教程
本文详细介绍了在CentOS 7上使用python-pip方式安装DockerCompose的过程,包括解决依赖问题和版本冲突的方法。

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

 

转载于:https://www.cnblogs.com/ethanw97m/p/9952667.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值