title: How to send HTTP requests to my server running in a docker container?
body: <p>I've set up a java application which acts as a web server and handles http requests.  I've tested that it works outside the container (which it does), but when in the container my requests don't seem to get to it.</p>
  
  <p>The server listens on port 3971, and the Dockerfile looks like this:</p>
  
  <pre><code>FROM java:8
  ADD VaultServer /
  EXPOSE 3971
  EXPOSE 3972
  ENTRYPOINT ["java", "-jar", "VaultServer.jar"]
  </code></pre>
  
  <p>Calling to the root address should return something (normally I'd send a GET to <a href="http://localhost:3971/" rel="noreferrer">http://localhost:3971/</a>).  </p>
  
  <p>I've tried replacing 'localhost' with the the ip address of docker-machine, and also with the ip address I get when inspecting the running container for my server, but neither seem to respond.  When I call to the ip address of docker-machine, I get ERR_CONNECTION_REFUSED.  Is there something else I need to enable?</p>