一、compose简介
- compose是一个定义和运行多容器的docker应用的工具。compose 通过yaml文件配置应用服务,然后仅需一个命令就可以创建和运行所有配置中的服务。
二、compose安装
1.下载最新compose版本
1 curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2.添加执行权限
1 chmod +x /usr/local/bin/docker-compose
3.命令补全工具(此步骤可选)
1 sudo curl -L https://raw.githubusercontent.com/docker/compose/1.23.1/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
4.测试安装结果
1 docker-compose --version
https://docs.docker.com/compose/install/#install-compose https://blog.csdn.net/cmzhuang/article/details/80363251