1、下载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
最新版docker-compose下载
sudo curl -L "https://github.com/docker/compose/releases/download/v2.28.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2、增加可执行权限
sudo chmod +x /usr/local/bin/docker-compose
3、添加软链接
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
4、确认版本
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
5、增加docker-compose命令补全
sudo yum install bash-completion -y
sudo curl \
-L https://raw.githubusercontent.com/docker/compose/1.29.2/contrib/completion/bash/docker-compose \
-o /etc/bash_completion.d/docker-compose
6、Docker命令补全
sudo yum install bash-completion -y
sudo curl -L https://raw.githubusercontent.com/docker/docker-ce/master/components/cli/contrib/completion/bash/docker -o /etc/bash_completion.d/docker
参考:
https://docs.docker.com/compose/install/
https://docs.docker.com/compose/completion/
标签:completion,compose,sudo,Compose,https,Docker,安装,docker,bash
From: https://blog.csdn.net/a120608yby/article/details/140578670