官网
Install Compose standalone
curl -SL https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
离线
下载文件
- 开启vpn
- 浏览器https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-linux-x86_64
- 获得二进制文件docker-compose-linux-x86_64
上传服务器
上传到服务器上,然后将其移动到/usr/local/bin,并重命名为“docker-compose”
sudo mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
赋予可执行权限
sudo chmod +x /usr/local/bin/docker-compose
查看是否安装成功
docker-compose -v