Docker Container to Host Routing
<p>I need a better up-to-date solution the following problem:</p>

<p>Problem: I have to manually create an iptable rule in order to allow a route from a dynamically docker bridge to the host. Otherwise container a cannot connect to container b because there is by default no route from a docker network to the docker host itself.</p>

<p>I have the following setup:</p>

<pre><code>container-nginx (docker)
|
|-container-jira (docker) (https://jira.example.com)
|-container-confluence (docker) (https://confluence.example.com)
</code></pre>

<p>In order to have properly functioning Atlassian application links between Jira and Confluence:</p>

<ul>
<li>Jira accesses Confluence over <a href="https://confluence.example.com" rel="nofollow">https://confluence.example.com</a></li>
<li>Confluence accesses Jira over <a href="https://jira.example.com" rel="nofollow">https://jira.example.com</a></li>
</ul>

<p>I use docker-compose for the whole setup and all container are inside the same network. By default this will not work i will get "no route to host" in both containers for hosts confluence.example.com and jira.example.com. Because every container inside the docker network have no route to the docker host itself.</p>

<p>Currently, each time the setup is initialized I manually create an iptable rule from the dynamically created docker bridge with id "br-wejfiweji" to the host.</p>

<p>This is cumbersome, is there "a new way" or "better way" to do this in Docker 1.11.x?</p>