1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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
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
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
|