title: docker elasticsearch container not forwarding port (macOs)
body: <p>I have a container set up to run elasticsearch. The service starts but I can't connect to it via curl or the browser.</p>
  
  <pre><code> RUN \
   cd /tmp &amp;&amp; \
   wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-  1.3.2.tar.gz &amp;&amp; \
   tar xvzf elasticsearch-1.3.2.tar.gz &amp;&amp; \
   rm -f elasticsearch-1.3.2.tar.gz &amp;&amp; \
   mv /tmp/elasticsearch-1.3.2 /elasticsearch
  
   # Define mountable directories.
   VOLUME ["/data"]
  
   # Define default command.
    CMD ["/elasticsearch/bin/elasticsearch"]
  
   EXPOSE 9200
   EXPOSE 9300
  </code></pre>
  
  <p>Connecting to <code>http://localhost:9200</code> yields nothing. The docker ps shows ports;</p>
  
  <pre><code> 0.0.0.0:49179-&gt;9200/tcp, 0.0.0.0:49180-&gt;9300/tcp
   ...
   net::ERR_ADDRESS_UNREACHABLE
  </code></pre>
  
  <p>Am I missing some config value? THANKS!</p>
  
  <p>[Update] I also tried the -p in the run command</p>
  
  <pre><code> docker run -i -p 9200:9200 -p 9300:9300 -t --rm -P team1/image1
  </code></pre>