如何在linux上安装docker-compose

在linux上安装docker-compose可以直接在github网站上直接下载。

  1. 打开docker-compose的github网址:https://github.com/docker/compose , 点击release。

  2. 打开的网站就有安装说明:

    //下载docker-compose到/usr/local/bin/目录,以下是参考,实际网址以github上为准
    curl -L https://github.com/docker/compose/releases/download/1.20.1/docker-compose-`uname -s-uname -m` -o /usr/local/bin/docker-compose

    //变成可执行文件
    chmod +x /usr/local/bin/docker-compose

  3. 检测是否安装成功

    docker-compose version
    //返回下面类似的表明安装成功
    docker-compose version 1.20.0, build ca8d3c6
    docker-py version: 3.1.3
    CPython version: 3.6.4
    OpenSSL version: OpenSSL 1.0.1t 3 May 2016