安装docker-compose
1.二进制安装
该方法受限制于网络,可能无法安装
下载:
# 地址中 v2.2.3 代表要安装的 docker-compose 版本
curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
赋予可执行权限:
chmod +x /usr/local/bin/docker-compose
创建软链:
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
测试:
docker-compose --version
pip安装
Centos
# 安装 python-pip yum -y install epel-release yum -y install python-pip # 安装 docker-compose pip install docker-compose
Ubuntu
sudo apt-get install python-pip sudo apt-get -y install docker-compose
测试
docker-compose version
该页面评论已关闭