cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
yum install -y yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum list docker-ce --showduplicates | sort -r
yum install docker-ce-18.06.0.ce-3.el7
systemctl start docker
systemctl status docker
docker version
centos yum安装docker
最新推荐文章于 2025-09-29 15:39:30 发布
本文详细介绍如何在CentOS系统中使用阿里云源更新yum仓库并安装Docker-ce。包括更改yum源、清理缓存、添加Docker仓库、列出Docker-ce版本、安装指定版本的Docker-ce以及启动和验证Docker服务。
430

被折叠的 条评论
为什么被折叠?



