1、从github上下载docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2、赋予docker-compose 操作文件夹权限
sudo chmod +x /usr/local/bin/docker-compose
3、建立全局命令
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
4、查看是否安装成功
docker-compose -v
特别注意:github上下载特别慢,可以使用下方命令下载安装,接着重复2、3步骤
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
网友评论