i have 2 docker containers - 1 running monitoring app , other running service, both running in same network namespace net=host. (mesos runs jobs parameter.)
the service can bind random port. how can query port has service bound to, monitoring container?
i tried reading /proc/net/tcp, seems complex. there easier way it?
so, if understand correctly, service binds random ports? if so, why case? guess far ideal, services use bin specific port when used in container.
for example, if have app (started via marathon) binds port defined via environment variable, set environment variable when start container, , use bridged
networking mode let mesos choose port port range.
if install mesos dns, use determine ip/port combination application name. e.g. if marathon app name testapp, service name testapp.marathon.mesos
.
see
Comments
Post a Comment