Within docker container can we get the host ip and the random ports allotted for the ports exposed . The use case is to send a serf event to join the cluster with the host ip and random port allotted by docker daemon so that the load balancer can update itself. I like to send the event from within the container with these details without any dependency on the host machine

有帮助吗?

解决方案

Jérôme Petazzoni : For now, you have to inject that info yourself with "-e"; but the upcoming beam protocol will help→https://github.com/dotcloud/docker/pull/4602

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top