title: How do I reach a container through the host's hostname from another container?
body: <p>I'm running docker 20.10 and docker-compose 1.29.2 on Centos 7.</p>
  <p>I have two containers (bitbucket and jenkins) running on <code>myhost</code> using docker-compose.  I'm using the default <code>bridge</code> network.  The following are the hosts names and services:</p>
  <pre><code>host        : service/port   : container/host port mapping
  myhost      : apache/80      : &lt;na&gt;
  bitbucket   : bitbucket/7990 : 7990:7990
  jenkins     : jenkins/8083   : 8083:8083
  workstation : &lt;na&gt;           : &lt;na&gt;
  </code></pre>
  <p>From <code>workstation</code>, I get results from <code>curl myhost:80</code> and I get results from <code>curl myhost:7990</code>.</p>
  <p>From <code>jenkins</code> I get results from <code>curl bitbucket:7990</code> and <code>curl myhost:80</code> but the problem is I <strong>DO NOT</strong> from <code>curl myhost:7990</code>.</p>
  <p>I need to be able to reach a submodule from <code>jenkins</code> that is in <code>bitbucket</code>, and I want the <code>.gitmodules</code> file to reference the same submodule URL: <code>myhost:7990/scm/project/repo</code>.</p>
  <p>I don't have any special network configuration on <code>myhost</code>.  I tried adding 7990 to the <code>docker</code> zone (firewall-cmd), but that did not help.</p>
  <p>It seems like it is <em>almost</em> working.  What is the problem and solution here?</p>
  <p>Thank you!</p>