Different Docker 1.9 networks talk to each other?

I want to create two Docker 1.9 networks. Network A runs a web server, an application server, and a Postgres server (all containers). Network B runs a SMTP server and other containers. I need containers on Network A to get to Network B. Is it possible?

  • tunnel ssh from another pc to docker
  • How to configue Pydev test runner to use Docker
  • Is there a way to access a running docker container on a remote server from my local development enviroment(Sublime)
  • How do I add a package to an already existing image?
  • How to deploy an application using Docker
  • TCP Proxy: Hold connections while backend is unavailable
  • deploying nodejs on docker
  • How do I get Apache and tomcat docker containers to talk to each other?
  • How to see the output of a service in a docker stack?
  • Strange tables in oracle xe
  • transform command line docker to Dockerfile
  • Dockerfile - Mount host directory - copy a tar fie and run it - Error
  • One Solution collect form web for “Different Docker 1.9 networks talk to each other?”

    The libnetwork implementation includes an overlay mode:

    The overlay driver implements networking that can span multiple hosts using overlay network encapsulations such as VXLAN. For more details on its design, please see the Overlay Driver Design.

    The new native overlay network driver supports multi-host networking natively out-of-the-box.
    This support is accomplished with the help of libnetwork, a built-in VXLAN-based overlay network driver, and Docker’s libkv library.

    This tutorial explains how to make containers talk to each other even if they are on different machines, provided they are registered to the same overlay network.

    That will involve setting up first a K/V (Key/Value) store:


    Now that your three nodes are configured to use the key-value store, you can create an overlay network on any node. When you create the network, it is distributed to all the nodes.

    When you create your first overlay network on any host, Docker also creates another network on each host called docker_gwbridge. Docker uses this network to provide external access for containers.

    Every container in an overlay network also gets an eth interface in the docker_gwbridge which allows the container to access the external world.
    The docker_gwbridge is similar to Docker’s default bridge network, but unlike the bridge it restricts Inter-Container Communication(ICC).
    Docker creates only one docker_gwbridge bridge network per host regardless of the number of overlay networks present.

    Docker added an entry to /etc/hosts for each container that belongs to the RED overlay network.
    Therefore, to reach container2 from container1, you can simply use its name. Docker automatically updates /etc/hosts when containers connect and disconnect from an overlay network.


    At this point, container2 and container3 can communicate over the RED overlay network.
    They are both on the same docker_gwbridge but they cannot communicate using that bridge network without host-port mapping. The docker_gwbridge is used for all other traffic.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.