title: How to access Docker container's web server from host
body: <p>I'm running under boot2docker 1.3.1.</p>
  
  <p>I have a Docker container running a web server via <code>uwsgi --http :8080</code>.</p>
  
  <p>If I attach to the container I can browse the web site using <code>lynx http://127.0.0.1:8080</code> so I know the server is working.</p>
  
  <p>I ran my container with:</p>
  
  <pre><code>$ docker run -itP --expose 8080 uwsgi_app:0.2
  </code></pre>
  
  <p>It has the following details:</p>
  
  <pre><code>$ docker ps
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                     NAMES
  5248ad86596d        uwsgi_app:0.2     "bash"              11 minutes ago      Up 11 minutes       0.0.0.0:49159-&gt;8080/tcp   cocky_hypatia
  $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' 5248ad86596d
  172.17.0.107
  </code></pre>
  
  <p>I thought I could access that web site from my host by going to <code>http://172.17.0.107:49159</code>.</p>
  
  <p>This does not work. I just see 'connecting...' in Chrome, getting nowhere.</p>
  
  <p>What am I doing wrong?</p>