CentOS7安装docker-compose

下载docker-compose二进制执行文件

[root@jiankunking-pc ~]# mkdir /data/tmp
[root@jiankunking-pc ~]# cd /data/tmp/
[root@jiankunking-pc tmp]# 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
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:02:00 --:--:--     0
curl: (35) Encountered end of file

因为网络不稳定,有可能失败,使用国内镜像地址下载

[root@jiankunking-pc tmp]# sudo curl -L "https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   423  100   423    0     0    616      0 --:--:-- --:--:-- --:--:--   617
100 12.1M  100 12.1M    0     0  9769k      0  0:00:01  0:00:01 --:--:-- 26.3M

修改docker-compose可执行权限,并查看docker-compose版本

[root@jiankunking-pc tmp]# sudo chmod +x /usr/local/bin/docker-compose
[root@jiankunking-pc tmp]# docker-compose -v
docker-compose version 1.29.2, build 5becea4c

你可能感兴趣的:(Docker,ElasticSearch,docker,容器,运维,docker-compose)