How can one Docker Container find the IP address of another Docker Container?

Working on my first MSA application, and trying to figure out how a Docker container can find the IP address of another Docker Container? My containers know the name of the other container it needs to connect to, but that is it. I can’t use a “–link” option or docker-compose as the components can come an go at different times, and I need a programmatic way to find the IP address of the other containers and start connections to them.

I have to think this problem has already been solved long long ago, but my GoogleFoo must be very weak today, as I can’t find anything!

Thanks for your help! 🙂

Source: StackOverflow