官网的方式去安装

https://docs.docker.com/compose/install/




 

下载docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

添加可执行权限
sudo chmod +x /usr/local/bin/docker-compose

将文件copy到 /usr/bin/目录下
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

查看版本
docker-compose --version


 

离线安装

访问https://github.com/docker/compose/releases,下载 docker-compose-Linux-x86_64,将docker-compose-Linux-x86_64重命名为docker-compose




添加可执行权限
chmod +x /usr/local/bin/docker-compose

将文件copy到 /usr/bin/目录下
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

查看docker-compose版本
docker-compose -v