安装docker-compose插件用作统一编排Docker容器
Centos安装最新版Docker-ce
详细安装教程:https://4xx.me/archives/52.html,最新版只支持Centos7.x,推荐官方脚本安装
安装docker-compose插件
先启动docker service docker start
官方教程:https://docs.docker.com/compose/install/#install-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
推荐用python的pip安装,我试了二进制包安装,下载超时...所以我用的pip装的
1.安装pip环境
#安装必要库
yum update
yum -y install gcc gcc-c++ make zlib* openssl openssl-devel openssl-static -y
#安装python-setuptools
yum install python-setuptools -y
# 或者 yum install python3-setuptools -y
easy_install pip
# 或者 easy_install3 pip
详细安装教程:https://cloud.tencent.com/developer/article/2019490
2.安装docker-compose
sudo pip install docker-compose
sudo curl -L --fail https://github.com/docker/compose/releases/download/1.20.1/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
#检查安装版本
docker-compose -v