compose v1安装
下载二进制执行文件到/user/local/bin/docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Bash添加执行权限
sudo chmod +x /usr/local/bin/docker-compose
Bash如果不可以执行可以链接到/usr/bin
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Bashcompose v2安装
在github上下载二进制执行文件到~/.docker/cli-plugins/docker-compose
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.1.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
Bash添加执行权限
chmod +x ~/.docker/cli-plugins/docker-compose
Bash