I am not sure if this question belongs to stackoverflow. I am using docker containers for my applications. To easily understand my architecture here is some pixel art:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Docker Network A +
+ +
+ ------------------ Request A ------------------ +
+ | Container A | <-------------- | Container B | +
+ | | | | +
+ | Rest Service | Request B | Worker with | +
+ | | <-------------- | VPN Proxy | +
+ ------------------ ------------------ +
+ +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The problem: Container B hast a VPN proxy, which is controlled by my application via python subprocess
. Before the app starts the proxy, Container B
makes a Request A
which is working fine. After that, the app starts the proxy and connects to a location, what is also working fine. But from now on Container B
is not able to resolve the hostname of Container A
, so all requests are failing.
My question: Is there are way to connect to Container A
even with enabled VPN Proxy from Container B
?
Update (2020-12-06 11:37):
I found out that the DNS is not working, but access directly via the IP seams working. This is a workaround for now, but not a satisfying solution. If anyone has an idea or advice, this would be awesome.