i have a docker image i would like to launch a couple instances of via Mesos/Marathon.
i'm using BRIDGE networking in docker, and i would like to pass in the "public" ( i.e. not the container's docker0 net ) address of the mesos slave / docker host the container is being started on, to the starting container, via env var or param, so i can advertise this ip in application responses ( the application is a Cassandra node, and i will populate broadcast_address
in cassandra.yaml with this address )
My understanding is that i can have Mesos forward any particular port ( within a configured range ) on this address back to the docker0 address of my running container. If this is true, and i can assure that the application instance ( Cassandra node ) does not get moved off this slave, with a couple constraints, i can have a mesos-scheduled Cassandra cluster.
My question is : how do i get the slave(docker host) ip address in to the Marathon application instance as it is being launched?