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
For me, I was unable to install pip due to the docker's DNS not configured properly. I've tried the above steps, however, configuring docker DNS to Google DNS does not work for my laptop. Docker's DNS can be properly configured only if I set its DNS to my laptop's assigned IP.
If you use Ubuntu, you can use the following steps to configure your docker's DNS:
Find out your device's assigned IP. You can find this by either
ifconfignmcli dev show | grep 'DNS'Edit dns in /etc/docker/daemon.json (create this file if it doesn't exist previously)
{
"dns": ["your_ip_in_step_1"]
}
Restart docker: sudo service docker restart