ck1987 发表于 2019-2-20 08:54:30

解决Docker的Error response from daemon报错

事件原因
  昨天公司的开发同学跟我说,使用docker pull拉取镜像时一直报错,报错信息如下:

# 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本上进行拉取镜像测试,发现是可以正常拉取的!

报错原因
  经过尝试,查看系统messages信息,发现是网络问题,如下:

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
[] } err:network xxxxxxxx not found"
  说明:上面无关信息我已经xxxx忽略掉了~
  后来想起来,公司的dockerhub库平台之前被迁移过,域名解析IP更改过!

处理报错
  尝试修改/etc/hosts强制docker.io相关的域名解析到其它可用IP。

vim /etc/hosts
  添加一个可用IP:

110.200.19.34dockerhub.daguan.com//请更改成自己的IP和域名
  保存之后重试,已恢复正常!

扩展学习
  如出现下面"timeout"报错信息,也可以尝试上面的修复方法,如下:

# docker image pull library/hello-world
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: dial tcp 52.20.146.203:443: i/o timeout
  或者是:

# 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/



页: [1]
查看完整版本: 解决Docker的Error response from daemon报错