Your VPN connects successfully. An internal hostname resolves on your laptop. The same hostname fails inside your application container.
It is tempting to replace the container’s DNS server and move on. Sometimes that changes the result. Sometimes it breaks internal names or sends queries somewhere you did not intend.
A working host connection does not establish that a container can reach the same DNS resolver or destination. Start by separating three questions:
Which resolver is being used?
Can the container reach that resolver?
Can the container reach the application after resolution succeeds?
This walkthrough focuses on Linux containers. Native Linux Docker Engine and Docker Desktop have different networking paths, so we will distinguish them where it matters.
The commands are diagnostic examples, not results from a tested VPN environment.
1.…