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
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.
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:
sudo mkdir -p /etc/systemd/system/docker.service.d
[Service] Environment="HTTP_PROXY=http://proxy.example.com:80/"
sudo systemctl daemon-reload
sudo systemctl restart docker
Reference: Docker documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With