系统相关
首页 > 系统相关> > CentOS7安装DockerCompose

CentOS7安装DockerCompose

作者:互联网

1.远程下载DockerCompose

curl -L https://github.com/docker/compose/releases/download/1.29.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

速度特别慢,可以自己从网上下载docke-compose文件

然后上传到 /usr/local/bin/ 目录下

2.修改文件的权限为可执行

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

3.Base自动补全命令

        3.1 执行以下命令

# 补全命令
curl -L https://raw.githubusercontent.com/docker/compose/1.29.1/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose

        3.2 若3.1中命令执行报错则先修改自己的hosts文件,再执行3.1

echo "199.232.68.133 raw.githubusercontent.com" >> /etc/hosts

标签:bin,compose,DockerCompose,local,CentOS7,usr,3.1,docker,安装
来源: https://blog.csdn.net/m0_47233175/article/details/121705375