title: Docker unable to access port outside the container
body: <p>I am running zookeeper( not thru docker ) on my localhost with port 2181.</p>
  
  <p>Also, trying to run a docker image thru docker compose as follows.</p>
  
  <pre><code>#
    # Mesos
    #
    mesos-master:
      image: mesosphere/mesos-master:1.0.3
      restart: always
      privileged: true
      network_mode: host
      volumes:
        - ~/mesos-data/master:/tmp/mesos
      environment:
        MESOS_CLUSTER: "mesos-cluster"
        MESOS_QUORUM: "1"
        MESOS_ZK: "zk://localhost:2181/mesos"
        MESOS_PORT: 5000
        MESOS_REGISTRY_FETCH_TIMEOUT: "2mins"
        MESOS_EXECUTOR_REGISTRATION_TIMEOUT: "2mins"
        MESOS_LOGGING_LEVEL: INFO
        MESOS_INITIALIZE_DRIVER_LOGGING: "false"
  </code></pre>
  
  <p>Zookeepr is listening on port 2181, but still my docker process is unable to connect to the zookeeper port 2181.</p>
  
  <p>Is there anything missing?</p>
  
  <p>Thanks</p>