安装Docker-Compose

安装 Docker Compose 可以通过下面命令自动下载适应版本的 Compose

sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

问题

curl: (35) Peer reports incompatible or unsupported protocol version.

更新nss,curl

yum update nss curl

1.首先检查linux有没有安装python-pip包,终端执行 pip -V

pip -V

2.没有python-pip包就执行命令 yum -y install epel-release

3.执行成功之后,再次执行yum -y install python-pip

4.对安装好的pip进行升级 pip install --upgrade pip

5.pip安装好了,执行pip -V 再次检查pip环境

6.安装Docker-Compose pip --default-timeout=200 install -U docker-compose

7.检查docker-compose 安装:docker-compose -version

如果报错:

pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5

解决方法

pip install --upgrade backports.ssl_match_hostname

安装Compose命令补全工具

curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

企业级Docker+Jenkins+Gitlab自动化构建平台搭建(图文教程)

https://www.toutiao.com/item/6611445413067096579

posted @ 2018-11-21 15:04  张建斌  阅读(258)  评论(0编辑  收藏  举报