1.安装docker-compose

https://github.com/docker/compose/releases 要安装其他版本的 Compose,请替换 v2.18.1

1
2
3
4
5
非大陆
sudo curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

大陆
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.18.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

2.添加可执行权限:x

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

3.在/usr/bin/路径下创建软连接

1
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

4.查看docker-compose版本

1
docker-compose version

ARM架构服务器Linux 安装 docker-compose

下载网址 https://github.com/docker/compose/releases/
甲骨文云的Ampere架构用 docker-compose-Linux-aarch64
放置路径/usr/local/bin
重命名docker-compose