2020-6-6正常
uname -a
>=2.6.32-431
1、先备份
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、更换源
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum install -y yum-utils device-mapper-persistent-data lvm2
yum makecache fast
yum -y install docker
启动Dcoker服务
systemctl start docker
开机自启
systemctl enable docker
配置加速
mkdir -p /etc/docker
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://1nj0zren.mirror.aliyuncs.com",
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com"
]
}
systemctl daemon-reload
systemctl restart docker
test
docker pull hello-world
docker run hello-world
https://blog.csdn.net/IronmanJay/article/details/104677814
https://mp.weixin.qq.com/s/iAZ1bM9SaaoKWpzjKAODQw
网友评论