Docker pull error

三世轮回 提交于 2019-11-28 07:01:12

问题


I've a problem with my Docker. When I run the docker pull command, I get a fatal error.

run: docker pull golang

get: Pulling repository golang FATA[0000] Get https://index.docker.io/v1/repositories/library/golang/images: dial tcp: lookup index.docker.io on [192.168.3.50]:53: server misbehaving

This problem occurred, even though I tried pull a different image.

How can I solve this problem?
My docker version is 1.4.1


回答1:


Your DNS-server can not lookup docker-register domain (index.docker.io). Please, recheck DNS-records in your local DNS-server or replace it for a public server, example, 8.8.8.8.




回答2:


I had this problem when doing docker build . and was getting

Error while pulling image: 
Get https://index.docker.io/v1/repositories/library/debian/images: 
dial tcp: lookup index.docker.io on 75.75.76.76:53: server misbehaving

and

Error while pulling image: 
Get https://index.docker.io/v1/repositories/library/debian/images: 
dial tcp: lookup index.docker.io: no such host

Restarting the vm that docker uses fixed my problem:

docker-machine restart default && eval "$(docker-machine env default)"



回答3:


I've seen a similar issue on OSX with Docker stable v1.13.0. The issue is intermittent and occurs on multiple OSX laptops in the office. When the issue manifests this is the error message:

error pulling image configuration: 
Get https://prod-ap-southeast-2-starport-layer-bucket.s3-REGION.amazonaws.com/XXX: 
dial tcp: lookup prod-REGION-starport-layer-bucket.s3-ap-southeast-2.amazonaws.com on 192.168.xxx.xxx:53: 
no such host

We have been able to reliably fix it by running the following command:

docker run --rm -v /etc/resolv.conf:/rtemp debian:8 bash -c 'echo "nameserver 8.8.8.8" > /rtemp'

Note this command needs to be run every time the docker client is started. The command is changing the docker engine DNS settings to stop proxying through docker client (and thus using your host DNS settings) and instead to resolve DNS queries through a Google DNS server at 8.8.8.8.

I believe the root cause is that the payload size of the DNS responses for the amazon URL changes, and when it is greater than 512 bytes the Docker client DNS proxy cannot handle the response.

I believe the root cause is discussed in this open docker issue but can't be sure : https://github.com/docker/docker/issues/18842




回答4:


try below commands

    $ docker-machine ssh
    $ sudo su
    $ echo "nameserver 8.8.8.8" > /etc/resolv.conf



回答5:


Yes, i solved my problem!! "I added a line nameserver 8.8.8.8 into /etc/resolv.conf " I just commented this line nameserver fe80::1%wlo1



来源:https://stackoverflow.com/questions/28301151/docker-pull-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!