因为国内的网络访问问题,拉取镜像会响应超时,因此需要更换国内的镜像源。
网易:
http://hub-mirror.c.163.comustc:
https://docker.mirrors.ustc.edu.cn中国科技大学:
https://docker.mirrors.ustc.edu.cn阿里云:
https://cr.console.aliyun.com/腾讯云:
https://mirror.ccs.tencentyun.com
创建或修改 /etc/docker/daemon.json 文件
vi /etc/docker/daemon.json
将文件的内容改为以下内容:
{
"registry-mirrors" : [
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://cr.console.aliyun.com",
"https://mirror.ccs.tencentyun.com"
]
}
重启docker
systemctl restart docker
查看docker镜像源
docker info

信息修改后则完成
总结
到此这篇关于docker更换镜像源的文章就介绍到这了,更多相关docker更换镜像源内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!
发表评论