1、更新yum源
yum update
2、更新yum-utils源
yum install -y yum-utils
3、yum install -y docker
yum install -y docker
4、安装docker-compose
下载Docker Compose二进制文件。你可以从Docker GitHub发布页面找到最新版本的Docker Compose的链接。执行以下命令下载Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
5、修改二进制文件的执行权限:
sudo chmod +x /usr/local/bin/docker-compose
6、验证:
docker -v
docker-compose --version
评论区