DNS issue with docker image

What worked for me was this guide.

from https://stackoverflow.com/a/40516974 (YOUR_DNS_IP_HERE is my addition)

Put this in /etc/docker/daemon.json:

{                                                                     
    "dns": ["YOUR_DNS_IP_HERE", "YOUR_DNS_IP_HERE"]   
}

Exit from root:

 exit

Now restart docker:

sudo service docker restart

VERIFICATION:

Now check that adding the /etc/docker/daemon.json file allows you to resolve 'google.com' into an IP address:

docker run busybox nslookup google.com