title: Docker, Communicate Two Containers Different Hosts Same Network
body: <p>Good morning, everybody,</p>
  <p>I was doing some testing with docker and I encountered a problem, for which I did not find a solution for the same case.</p>
  <p>In my deployment, I want a server and a client to communicate, so far in different containers but on the same host. From the client I used the private IP of the server, and everything worked fine, here I show the compose:</p>
  <p>Server:</p>
  <pre><code>   version: &quot;3.3&quot;
  services:
    app:
      image: python-server:ARM
      ports:
        - 8080:8080
  </code></pre>
  <p>Client:</p>
  <pre><code>  version: &quot;3.3&quot;
  services:
    app:
      image: python-client:ARM
      ports:
        - 5040:5040
      volumes:
        - /dataf/1.csv:/app/1.csv:ro
  networks:
    default:
      external:
        name: server_default
  </code></pre>
  <p>However, when trying to do this communication, on two separate hosts [for example one on my host and one on virtual machine, both are on the same network] this fails. It is doubtful to me what the yamls should look like so that client and server could communicate with each other</p>