CentOS下安装docker-compose记录

安装方式

Linux下安装

  1. 运行如下命令

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

    要安装其他版本可以替换1.25.0

    国内镜像地址:

    1
    sudo curl -L "https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  2. 赋予执行可执行权限

    1
    sudo chmod +x /usr/local/bin/docker-compose
  3. 测试安装结果

    1
    docker-compose -v

    docker-compose version 1.25.0, build 0a186604