title: Docker can't connect to Container exposed port
body: <p><strong>SCENARIO:</strong></p>
  
  <p>Hey there,I'm running a docker compose with containers.
  This compose file works like charm on ma local docker desktop on windows 10. 
  I configured my own network with network <code>driver bridge.</code>
  Now I want to run the docker compose on an external server with an ubuntu vm.
  I have remote putty connection to the server. When I run <code>docker-compose up</code> all my services start successfully. I also have portainer running to have a gui control on that.</p>
  
  <p><strong>PROBLEM:</strong>
  Lika I said, all my services are an running. The only difference to my local setup is that I startet portainer as a single container. I cann connect to portainer with my Browser and inspect the whole setup. But when I want to call my expose container, I can't get a connection and get a connection faild error. 
  When I have a look at the IP Adress Column in portainer in the Containers spec, I see that portainer has a different ip than my docker compose containers. So portainer has 172.17.xxx and all the other containers start with 172.20.xxx Obviosly my exposed ports in my private network are not exposed to the host bridge network. </p>
  
  <p><strong>What I expect</strong>
  I want to have my exposed ports to be availble by the ip of my virtual machine like my portainer instance.</p>
  
  <p><strong>Thoughts</strong>
  I'm pretty new to docker so I checked the <a href="https://docs.docker.com/v17.09/engine/userguide/networking/#bridge-networks" rel="noreferrer">docs</a> and I thought because of the description:</p>
  
  <blockquote>
    <p>Within a user-defined bridge network, linking is not supported. You
    can expose and publish container ports on containers in this network.
    This is useful if you want to make a portion of the bridge network
    available to an outside network.</p>
  </blockquote>
  
  <p>..that bridge as the network driver would connect my network to the local host internet connection.</p>
  
  <p><strong>Question:</strong>
  Is there something wrong when I run portainer seperate from my compose?
  Is there something else to keep in mind when I run my compose on an external server and not on my localhost in point of networking?</p>
  
  <p><strong>compsose network cfg:</strong></p>
  
  <pre><code>networks:
    my_net:
      driver: bridge
  </code></pre>
  
  <p>and my compose Version is 2.1</p>
  
  <p><strong>UPDATE:</strong>
  Docker ps says all up and running
  docker inpsect on a container I want to reach via Internet:</p>
  
  <pre><code>"NetworkSettings": {
              "Bridge": "",
              "SandboxID": "9e1e335ab30f1f4d3f690e8902e06523fa095e7d8bshddkdksis7d66s7sjdjd",
              "HairpinMode": false,
              "LinkLocalIPv6Address": "",
              "LinkLocalIPv6PrefixLen": 0,
              "Ports": {
                  "7778/tcp": [
                      {
                          "HostIp": "0.0.0.0",
                          "HostPort": "7778"
                      }
                  ]
              },
              "SandboxKey": "/var/run/docker/netns/9e1e386ttf56",
              "SecondaryIPAddresses": null,
              "SecondaryIPv6Addresses": null,
              "EndpointID": "",
              "Gateway": "",
              "GlobalIPv6Address": "",
              "GlobalIPv6PrefixLen": 0,
              "IPAddress": "",
              "IPPrefixLen": 0,
              "IPv6Gateway": "",
              "MacAddress": "",
              "Networks": {
                  "my_net": {
                      "IPAMConfig": null,
                      "Links": null,
                      "Aliases": [
                          "3cb72e02c43b",
                          "usermanagement-service"
                      ],
  
                      "Gateway": "172.20.xx.x",
                      "IPAddress": "172.20.xx.xx",
                      "IPPrefixLen": 16,
                      "IPv6Gateway": "",
                      "GlobalIPv6Address": "",
                      "GlobalIPv6PrefixLen": 0,
                      "DriverOpts": null
                  }
              }
          }
      }
  </code></pre>