I\'m following the fig guide to using docker with a python application, but when docker gets up to the command
RUN pip install -r requirements.txt
Configuring docker DNS to Google DNS (8.8.8.8) or 10.0.0.2 did not work in my company environment.
Running: $ drill @8.8.8.8 www.amazon.com or @10.0.0.2 confirmed this.
In order to find a DNS that would work I ran: $ drill www.amazon.com and it gave me the DNS IP that is being used in my network.
Then I set it in Ubuntu using the following step to configure docker's DNS.
Changed dns in /etc/docker/daemon.json
{
"dns": ["the DNS ip from step1"]
}
Restart docker: sudo service docker restart