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 have struggled for some time with this now as well, but here it is what solved it for me on Ubuntu 16.04 x64
. I hope it saves someone's time, too.
In /etc/NetworkManager/NetworkManager.conf
:
comment out
#dns=dnsmasq
Create (or modify) /etc/docker/daemon.json
:
{
"dns": ["8.8.8.8"]
}
sudo service docker restart