I\'ve been trying to run Docker build on various files which previously worked before, which are now no longer working.
As soon as the Docker file included any line
I found this answer after some Googleing. I'm using Windows, so some of the above answers did not apply to my file system.
Basically run:
docker-machine ssh default
echo "nameserver 8.8.8.8" > /etc/resolv.conf
Which just overwrites the existing nameserver used with 8.8.8.8 I believe. It worked for me!
Based on some comments, you may have to be root. To do that, issue sudo -i.