October 30, 2020
By configuring your Docker containers to talk to a custom DNS server, you gain more control over how your container look up other services – database, other microservices, etc.,
It turns out Docker networking isn’t completely straight forward. On Linux you can:
Run a DNS server locally, either dnsmasq or devdns Run your container with --dns 172.17.0.1, the magic IP where your host machine is located Configure dnsmasq from step 1 via /etc/hosts Sadly, none of it was easy.