call container B inside container A using docker networks I have two docker containers A and B that runs on the same user-defined network.
Container A has a port published, container B hasnt.
I do my requests on container's A published port, but container A needs to do requests on container B.
The requests to B inside A are mapped to 0.0.0.0:(container B needed port)/route.
These fails.


How could I call B inside A without getting and changing IP based on the network every time?
If you have a user-defined network set to bridge, you can access other containers by their container's name which is automatically as hostname for containers inside same network.

So from containerA you could do ping containerB without problems. In your case it would be changing the setting to containerB_name:(container B needed port)/route