#!/bin/bash
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
cd /etc/yum.repos.d/
curl http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum makecache
yum repolist
#!/bin/bash
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
docker -v
原文:https://www.cnblogs.com/zby9527/p/14047948.html