title: Empty response from server running inside Docker container
body: <p>I have a Docker container running on my laptop containing a server. The server is running at <code>localhost:9000</code>. I've set up port-forwarding between my laptop and the VM like this:</p>
  
  <pre><code>VBoxManage modifyvm "default" --natpf1 "tcp-port9000,tcp,,9000,,9000";
  </code></pre>
  
  <p>Now, I try to start a container like this:</p>
  
  <pre><code>docker run -p 9000:9000 -t -i my-image
  </code></pre>
  
  <p>But when I try to connect, I get the following error:</p>
  
  <pre><code>$ curl localhost:9000                                                   
  &gt; curl: (52) Empty reply from server
  </code></pre>
  
  <p>Looking at the logs of my server, the request never even makes it there, so something else must be wrong. How can I diagnose this issue?</p>