美文网首页
Docker-Compose安装—CentOS7

Docker-Compose安装—CentOS7

作者: G_YDG | 来源:发表于2019-03-12 11:02 被阅读0次

    安装Docker-Compose之前,需要先安装 python-pip

    python-pip安装

    检查是否已安装python-pip包

    [root@localhost]# pip -V

    python-pip 安装

    [root@localhost]# yum -y install epel-release

    [root@localhost]# yum install python-pip

    升级安装好的pip 

    [root@localhost]# pip install --upgrade pip

    安装完成检查pip环境

    [root@localhost]# pip -V

    安装完成后,进行Docker-Compose的安装

    [root@localhost]# pip install docker-compose

    安装完成,检查docker-compose:

    [root@localhost]# docker-compose -version

    安装Docker-Compose时,可能会出现的错误以及解决方法:

    1.若报错:ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out

    解决方法:pip --default-timeout=200 install -U docker-compose

    2.若报错: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.

    解决办法:pip install docker-compose --ignore-installed requests

    3.若报错:pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5

    解决办法:

    更新backports.ssl-match-hostname的版本

    在终端输入命令 pip install --upgrade backports.ssl_match_hostname

    如若python版本过低,需升级,见:http://www.cnblogs.com/YatHo/p/8257387.html

    本人在学习安装Docker-Compose时,原参考于文章https://www.cnblogs.com/YatHo/p/7815400.html

    相关文章

      网友评论

          本文标题:Docker-Compose安装—CentOS7

          本文链接:https://www.haomeiwen.com/subject/ddrgpqtx.html