O'Reilly logo

Orchestrating Docker by Shrikrishna Holla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Service discovery

Docker assigns an IP to a container dynamically from a pool of available addresses. While this is good in some ways, it creates a problem when you are running containers that need to communicate with each other. You just cannot know when building an image what its IP address is going to be. Your first instinct might be to start the containers, then log in to them (via docker exec), and set the IP addresses of the other containers manually. But remember, this IP address can change when a container restarts, so then you would have to manually log in to each container and enter the new IP address. Could there be a better way? Yes, there is.

Service discovery is a collection of everything that needs to be done to let services know ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required