dial tcp: lookup xxx.xxx.xxx.xxx: no such host
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:
- Create a systemd drop-in directory for the docker service:
sudo mkdir -p /etc/systemd/system/docker.service.d
- 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/"
- Flush changes
sudo systemctl daemon-reload
- Restart docker daemon
sudo systemctl restart docker
Reference: Docker documentation.