Docker Search 异常:Error response from daemon: Get https://index.docker.io/v1/search?xxx
docker search tomcatError response from daemon: Get https://index.docker.io/v1/search?q=tomcat&n=25: dial tcp: lookup index.docker.io: no such host执行docker search xxx出现Error response from daemo...
·
docker search tomcat
Error response from daemon: Get https://index.docker.io/v1/search?q=tomcat&n=25: dial tcp: lookup index.docker.io: no such host
执行docker search xxx
出现Error response from daemon
异常时,一般是镜像加速地址配置的问题,如果已经配置过加速还是如上问题,多配置几个加速地址:
vi /etc/docker/daemon.json
#添加如下内容
{
"registry-mirrors": ["http://hub-mirror.c.163.com","http://hub-mirror.c.163.com","https://registry.docker-cn.com"]
}
重启docker服务:
service docker restart
如果还是不起作用,可能是DNS解析的问题:
修改服务器DNS网络配置:
vi /etc/resolv.conf
将自己网络的DNS地址追加到尾部:
查看网络的DNS:
将图中DNS地址追加到文件中
nameserver 10.xx.x.xxx
nameserver 10.xx.x.xxx
修改完成后重启网络服务
systemctl restart network
更多推荐
已为社区贡献1条内容
所有评论(0)