Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dial tcp: lookup xxx.xxx.xxx.xxx: no such host

Tags:

Trying to push an docker image to private docker repository. but getting error like: "dial tcp: lookup xxx.xxx.xxx.xxx: no such host". I have logged in correctly to the repository and build succeeded.

The following command using to push the image to private repo: sud docker push x.x.x.x:446/dns/graphs

like image 544
pavan Avatar asked Nov 24 '15 11:11

pavan


2 Answers

Editing the DNS nameserver in /etc/resolv.conf file helped me.

Change your existing nameserver to google nameserver i.e., x.x.x.x to 8.8.8.8

Comment your nameserver IP and add something like this :

#nameserver x.x.x.x nameserver 8.8.8.8   

should work.

like image 113
pavan Avatar answered Sep 16 '22 18:09

pavan


If you are behind a proxy, this could be your issue. In this case, you need to configure the Docker daemon (not the client) proxy settings. You can do that by:

  1. Create a systemd drop-in directory for the docker service:
    • sudo mkdir -p /etc/systemd/system/docker.service.d
  2. Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:
    • [Service] Environment="HTTP_PROXY=http://proxy.example.com:80/"
  3. Flush changes
    • sudo systemctl daemon-reload
  4. Restart docker daemon
    • sudo systemctl restart docker

Reference: Docker documentation.

like image 43
FTM Avatar answered Sep 17 '22 18:09

FTM