title: Accessing a docker container URL on Windows host
body: <p><em>Caveat # 1</em>: I've read <a href="https://stackoverflow.com/questions/24911380/exposing-a-docker-container-port" title="this answer">this answer</a>, <a href="https://stackoverflow.com/questions/32826192/networking-with-docker-on-windows">this answer</a>, and a miriad other answers/posts and I still can't get it to work.</p>
  
  <p><em>Caveat # 2</em>: I'm new to docker, so I'm probably missing something really simple.</p>
  
  <p>I'm running Docker on Windows, and have <a href="https://hub.docker.com/r/sebp/elk/" rel="nofollow noreferrer">this ELK image</a> running which I launched with this command:</p>
  
  <pre><code>sudo docker run -p 5601:5601 -p 9200:9200 -p 5000:5000 -it --name elk sebp/elk
  </code></pre>
  
  <p>I'm trying to access ports <code>5601</code> and <code>9200</code> from a browser running on Windows, and I keep getting a connection timeout. Here's what I've done:</p>
  
  <ul>
  <li>I believe the <code>docker run</code> command (above) is forwarding ports 5601 and 9200 from the container to the docker host (boot2docker VM) already, so that should be fine. </li>
  <li>I got the elk docker container IP by running <code>docker inspect $(docker ps -q) | grep IPA</code> on the docker CLI. This turned out to be <code>172.17.0.9</code>. I then ran <code>curl 172.17.0.9:5601</code> and <code>curl 172.17.0.9:9200</code>. I was able to get proper HTML responses from those URLs. This allowed me to verify things were running properly in the docker container/host. </li>
  <li>Then I got the docker host's IP by running <code>docker-machine ip default</code>. This turned out to be 192.168.99.100. I believe this is all I need to access the elk container from the docker host (Windows in this case), since port forwarding for the container was already set. With that IP, I tried going to <code>http://192.168.99.100:5601</code> and <code>http://192.168.99.100:9200</code> and I get <code>ERR_CONNECTION_TIMED_OUT</code>. I also tried using IE, and even <code>https</code> for kicks, and still no luck. </li>
  <li>I also tried pinging <code>192.168.99.100</code> from DOS, but was unable to get a response. I tried relaxing the firewall rules in Windows (just for kicks again) and I got nothing. </li>
  </ul>
  
  <p>What am I missing?  </p>