如果已经安装了docker-compose,先卸载。

debian:
apt remove docker-compose

centos:
yum remove docker-compose

下载最新版二进制文件并加权限:


curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose