Docker Compose 是 Docker 的独立产品,因此需要安装 Docker 之后在单独安装 Docker Compose .
https://docs.docker.com/compose/install/#install-compose
(官方文档走一波)
方法一:
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
查看版本
docker-compose version
安装补全工具(可选)
为了方便我们输入命令,也可以安装 Docker 的补全提示工具帮忙我们快速输入命令
yum install bash-completion
下载docker-compose脚本
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose