CentOS 8 安装 docker-compose
方法一:
-
安装Python-pip
yum -y install epel-release
dnf install -y python3
dnf install python3-paramiko
-
安装docker-compose
pip3 install docker-compose
方法二:
-
从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
-
添加可执行权限
sudo chmod +x /usr/local/bin/docker-compose
-
查看docker-compose版本
docker-compose --version