昨天公司的开发同窗跟我说,使用docker pull拉取镜像时一直报错,报错信息以下:linux
# docker pull dockerhub.daguan.com/ceshi/data_test:18.12.13.1153 Error response from daemon: manifest for dockerhub.daguan.com/ceshi/data_test:18.12.13.1153 not found
我开始在本身的Mac本上进行拉取镜像测试,发现是能够正常拉取的!docker
通过尝试,查看系统messages信息,发现是网络问题,以下:vim
Dec 20 11:13:46 dockertest dockerd: time="2018-12-20T11:13:46.498227008+08:00" level=error msg="failed removing service binding for xxxxxx epRec:{rec_priv_indexing.1.xxxx rec_priv_indexing xxxxxx 192.168.246.171 192.168.246.250 [] [indexing] [xxxxxx]} err:network xxxxxxxx not found"
说明:上面无关信息我已经xxxx忽略掉了~网络
后来想起来,公司的dockerhub库平台以前被迁移过,域名解析IP更改过!tcp
尝试修改/etc/hosts强制docker.io相关的域名解析到其它可用IP。ide
vim /etc/hosts
添加一个可用IP:学习
110.200.19.34 dockerhub.daguan.com //请更改为本身的IP和域名
保存以后重试,已恢复正常!测试
如出现下面"timeout"报错信息,也能够尝试上面的修复方法,以下:.net
Error response from daemon: Get https://index.docker.io/v1/users/: dial tcp: lookup index.docker.io on 192.168.65.1:53: read udp 192.168.65.2:58812->192.168.65.1:53: i/o timeout
或:code
若是使用上面的方法即修改/etc/hosts
,没有效果,请更改下本身电脑上Docker subnet
网段,以下:
在上图中,咱们看到192.168.65.1
网段出现了问题,那么咱们更改下Docker subnet 为192.168.66.0
,重启docker便可!
或者是:
[root@archlinux quanxj]# docker image pull library/hello-world Using default tag: latest latest: Pulling from library/hello-world ca4f61b1923c: Pull complete error pulling image configuration: Get https://registry-1.docker.io/v2/library/hello-world/blobs/sha256:f2a91732366c0332ccd7afd2a5c4ff2b9af81f549370f7a19acd460f87686bc7: dial tcp 35.169.231.249:443: i/o timeout
解决Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/