1、下载
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
To install a different version of Compose, substitute 1.24.1 with the version of Compose you want to use.
2、添加可执行权限
$ sudo chmod +x /usr/local/bin/docker-compose
3、创建软链接
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
4、验证
$ docker-compose --version
docker-compose version 1.24.1, build 4667896b