title: Docker access elasticsearch endpoint from host
body: <p>I'm running a docker image using the following command:</p>
  
  <pre><code> docker run -P elasticsearch:2.2
  </code></pre>
  
  <p>I am able to access the http endpoint that runs on port 9200 from the host, however I'm unclear on how I can set the publish_address so that it doesn't keep changing. I attempted to modify the elasticsearch.yml and set the network.publish property to the ip address assigned to docker0 and eth0 as well as lo and even though it confirms the binding in the output on startup, curling to the address gives me a connection refused.</p>