In a simplified example, I have 3 Docker containers located on 2 Docker networks:
Container_A : Connected to Network_1 and Network_2
Container_B : Connected to Network_1
Container_C : Connected to Network_2
When running ping Container_B
from inside Container_A, the Docker network layer resolves the IP adress of Container_C instead of Contaier_B.
If I kill Container_C the name resolving will go back to the expected behaviour, but as soon as Container_C comes back online, the network layer starts resolving the wrong IP adresses again.
This has caused me a great headache and I have no idea how to fix this. Thanks for any advice.