I have two containers (flask application) on the same network. In my case, the two containers can communicate with IP address but it doesn't work as expected with the container name.
I have read on the documentation that containers can not only communicate by IP address, but can also resolve a container name to an IP address. This capability is called automatic service discovery.
I don't understand what I am missing.
Thank you for the replies.
EDIT :
How I run the containers :
docker run -p 5001:5001 --net testnetwork --rm
docker run -p 5000:5000 --net testnetwork --rm