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?

  • Authenticate with Docker registry API
  • How to connect to docker host from container on Windows 10 (Docker for Windows)
  • Using load testing app in docker
  • How to create flexible onbuild docker image that uses env vars?
  • How to run docker to process host file
  • docker: how to get veth bridge interface pair easily?
  • Where to place .gitignore file(s) under docker?
  • Git to docker export
  • Docker windows loading kernel modules
  • kubernetes volume hostPath
  • Deploying with Docker into production: Zero downtime
  • Docker, Registrator and Consul by example
  • 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:

    https://github.com/docker/dceu_tutorials/raw/master/images/tut6-step1.png

    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.

    https://github.com/docker/dceu_tutorials/raw/master/images/tut6-step6.png

    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.