title: Host unreachable inside Docker container
body: <p>I've got a docker container on host <code>183.83.83.83</code>
  The A record of a subdomain mycontainer.example.com points to this IP.</p>
  
  <p>A curl to <code>183.83.83.83</code> or <code>mycontainer.example.com</code> gives HTTP status 200 and the correct website.</p>
  
  <p>However the same curl from inside every container on that host (to both the IP or hostname above) fails to connect:</p>
  
  <pre><code>curl: (7) Failed to connect to mycontainer.example.com port 80: Host is unreachable
  </code></pre>
  
  <p>This doesn't happen when trying this from a Docker container from another host or from the host itself.</p>
  
  <p>What is going wrong here?</p>
  
  <p><em>EDIT:</em> More details:
  The host runs an <a href="https://github.com/jwilder/nginx-proxy/" rel="noreferrer">Nginx-proxy container</a> which proxies all requests to <code>mycontainer.example.com</code> to my frontend container (running a React application through a little node webserver). The frontend container is supposed to proxy all API requests from <code>mycontainer.example.com/api</code> to <code>mycontainer.example.com:1337/api/v1</code>. However it can't proxy the API requests because I get the error <code>Host is unreachable</code> from inside all containers running on this host.</p>