1、下载最新版的docker-compose文件
1)链接下载
https://link.zhihu.com/?target=https%3A//github.com/docker/compose/releases/download/v2.5.0/docker-compose-linux-x86_64
2)命令下载
sudo curl -L "https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2、安装docker-compose
若是链接下载,需要将对应的文件上传到/usr/local/bin/ 目录下
cd /usr/local/bin/ mv docker-compose-linux-x86_64 docker-compose sudo chmod +x docker-compose
3、创建软链接以便于从任何位置调用 docker-compose
命令
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
4、测试安装结果
docker-compose --version
标签:bin,compose,安装,sudo,usr,docker,local From: https://www.cnblogs.com/flyToDreamJava/p/18165287