2.安装docker、docker compose
1. 安装依赖包
yum install -y yum-utils device-mapper-persistent-data lvm2
2. 设置阿里云docker-ce镜像源
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3. docker-ce 安装
yum install -y docker-ce
4. docker-compose 安装(最新版)
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
5. 增加执行权限
sudo chmod +x /usr/local/bin/docker-compose
原文地址:https://blog.csdn.net/qq_42038997/article/details/144132870
免责声明:本站文章内容转载自网络资源,如侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!