Docker - 安装 docker-compose
程序员文章站
2022-03-12 15:34:58
...
获取包
直接下载
运行此命令下载Docker Compose的当前稳定版本:
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
若开发机访问不了外网,可参考离线下载方式
离线安装
获取环境信息
[aaa@qq.com ~]# uname -m
x86_64
[aaa@qq.com ~]# uname -s
Linux
下载包
访问:https://github.com/docker/compose/releases
选择和自己系统相匹配的包进行下载
可通过rz
命令上传到服务器,并移动到usr/local/bin/
目录,改名为docker-compose
[aaa@qq.com ~]# sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
增加权限
[aaa@qq.com ~]# chmod +x /usr/local/bin/docker-compose
验证
[aaa@qq.com ~]# docker-compose -v
docker-compose version 1.26.0, build d4451659