centos7安装docker-compose

查看官方文档

https://docs.docker.com/compose/install/

选择linux

按照文档,执行命令

#下载
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

#添加执行权限
sudo chmod +x /usr/local/bin/docker-compose

#将文件copy到 /usr/bin/ 目录下
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

#测试安装结果
docker-compose --version

出现类似结果即成功安装完成。

第一步下载网速缓慢可用如下域名替换github.com域名

get.daocloud.io

sudo curl -L "https://get.daocloud.io/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
posted @ 2020-12-06 22:59  shih945  阅读(64)  评论(0编辑  收藏  举报