当前位置: 代码迷 >> 综合 >> CentOS 8 安装 docker-compose
  详细解决方案

CentOS 8 安装 docker-compose

热度:44   发布时间:2023-11-06 06:08:44.0

CentOS 8 安装 docker-compose

方法一:

  1. 安装Python-pip

    yum -y install epel-release
    
    dnf install -y python3
    
    dnf install python3-paramiko
    
  2. 安装docker-compose

    pip3 install docker-compose
    

方法二:

  1. 从Github上下载安装(注:1.27.4为版本号)

    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
    

    访问太慢,用daocloud下载

    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
    
  2. 添加可执行权限

    sudo chmod +x /usr/local/bin/docker-compose
    
  3. 查看docker-compose版本

    docker-compose --version
    
  相关解决方案