From the docker linking
I can have A container links to B container.
Then I can see the B's ip address and exposed port in A's ENV variables.
However, how can I figure out A's ip address wihtin B container?
From the docker linking
I can have A container links to B container.
Then I can see the B's ip address and exposed port in A's ENV variables.
However, how can I figure out A's ip address wihtin B container?
To find one container from another, you can use a 'service discovery' mechanism such as SkyDock.
Skydock - Automagic Service Discovery for Docker
Skydock monitors docker events when containers start, stop, die, kill, etc and inserts records into a dynamic DNS server skydns. This allows standard DNS queries for services running inside docker containers.
For the more complex case where your containers are on multiple hosts and you need a way to network them together, see weave-dns (Please note I work on weave and weave-dns).