方法1: 修改国内镜像源

1、修改daemon配置文件:vim /etc/docker/daemon.json

{
"registry-mirrors": ["https://***吴彦祖的地址***.mirror.aliyuncs.com"]
}

这里推荐几个镜像源

// docker 中国区镜像源
https://registry.docker-cn.com
// 网易镜像源
http://hub-mirror.c.163.com
// 阿里云镜像源
https://registry.cn-hangzhou.aliyuncs.com

国内可以正常访问的镜像网址,大部分镜像都有,可以作为一个应急下载源
第三方镜像-可信镜像中心网址

// 官方网址
https://atomhub.openatom.cn/

// 下载示例
docker pull atomhub.openatom.cn/amd64/redis:7.0.2

修改完daemon.json后重启docker

systemctl daemon-reload
systemctl restart docker 

方法2: 增加加速器

1、修改daemon配置文件:vim /etc/docker/daemon.json

{
"registry-mirrors": 
	[
		"https://do.nark.eu.org",
		"https://dc.j8.work",
		"https://docker.m.daocloud.io",
		"https://dockerproxy.com",
		"https://docker.mirrors.ustc.edu.cn",
		"https://docker.nju.edu.cn"
	]
}

修改完daemon.json后重启docker

systemctl daemon-reload
systemctl restart docker 

附:阿里云个人镜像加速器
网址:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
或者搜索容器镜像服务》镜像工具》容器加速器,或者个人专属加速器

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐