- 1.下载程序
docker-compose官网
存放到/usr/local/bin
目录下,就不用再修改环境变量了
cd /usr/local/bin
如果直接下载过慢,建议用其它方式下载再上传
wget https://github.com/docker/compose/releases/download/v2.24.7/docker-compose-linux-x86_64
- 2.调整权限
修改包名
mv /usr/local/bin/docker-compose-linux-x86_64 /usr/local/bin/docker-compose
授予执行权限
chmod +x /usr/local/bin/docker-compose
- 3.测试
输入以下命令
docker-compose --version
返回软件版本即为安装正常