title: Query port number used by process in a docker container
body: <p>I have 2 docker containers - one running a monitoring app and the other running a service, both running in the same network namespace with net=host. (Mesos runs all jobs with this parameter.)</p>
  
  <p>The service can bind to a random port.
  How can I query which port has the service  bound itself to, from the monitoring container?</p>
  
  <p>I tried reading /proc/net/tcp, but that seems to be very complex. Is there an easier way to do it?</p>