docker使用 curl 命令安装 docker-compose 安装后报错

使用curl命令安装docker-compose时报错:

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

[root@localhost tile38]# curl -L "https://github.com/docker/compose/releases/download/1.17.1/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   617    0   617    0     0    782      0 --:--:-- --:--:-- --:--:--   782
  0 8649k    0 34370    0     0    635      0  3:52:27  0:00:54  3:51:33     0
  0 8649k    0 34370    0     0    105      0 23:25:50  0:05:24 23:20:26     0
[root@localhost tile38]# chmod +x /usr/local/bin/docker-compose
[root@localhost tile38]# ls /usr/local/bin/docker-compose
/usr/local/bin/docker-compose
[root@localhost tile38]# docker-compose version
Cannot open self /usr/local/bin/docker-compose or archive /usr/local/bin/docker-compose.pkg
[root@localhost tile38]# docker-compose up -d
Cannot open self /usr/local/bin/docker-compose or archive /usr/local/bin/docker-compose.pkg

解决办法:


进入下面的网址下载目前的最新版:
https://github.com/docker/compose/releases/tag/1.14.0-rc2
网页拉到最下面,下载:
docker-compose-Linux-x86_64
然后将文件上传到 /usr/local/bin/ 文件夹下,然后将其重命名为docker-compose,修改此文件的权限,增加可执行:chmod +x /usr/local/bin/docker-compose
然后再运行 

docker-compose version即可。

另一个方法:

 wget   https://coding.net/u/aminglinux/p/yuanke_centos7/git/blob/master/25docker/docker-compose-Linux-x86_64
 yum install -y  docker-compose

docker-compose up -d

转载于:https://my.oschina.net/yuanhaohao/blog/3061076

你可能感兴趣的:(docker使用 curl 命令安装 docker-compose 安装后报错)