I am trying to understand how to get DNS to work inside Docker containers on Ubuntu 20 host. More specifically, the private DNS entries of all of my AWS resources are not propagating while on VPN.
Of course, these DNS names resolve fine on Ubuntu host. But as soon as I try to work on my application or use pgadmin4 to connect to databases in AWS, I just get errors like “failure in name resolution.”
We use Openvpn3 to connect to our VPN running in AWS VPC.
I tried to use dnsmasq based on the articles linked below, but was not successful configuring it. Well, more accurately, I believe I configured it properly, but it didn’t solve the issue.
I have tried using docker-compose with and without a custom network. Nothing seems to work.
The resources online are either outdated or too specific to other cases.
I would really appreciate it if someone would be willing to assist with a configuration that is reliable and pushes custom DNS from my VPN’s name server into the docker network.