github.com/netbrain/docker@v1.9.0-rc2/docs/reference/commandline/network_connect.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "network connect"
     4  description = "The network connect command description and usage"
     5  keywords = ["network, connect"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  +++
     9  <![end-metadata]-->
    10  
    11  # network connect
    12  
    13      Usage:  docker network connect [OPTIONS] NETWORK CONTAINER
    14  
    15      Connects a container to a network
    16  
    17        --help=false       Print usage
    18  
    19  Connects a running container to a network. This enables instant communication with other containers belonging to the same network.
    20  
    21  ```
    22    $ docker network create -d overlay multi-host-network
    23    $ docker run -d --name=container1 busybox top
    24    $ docker network connect multi-host-network container1
    25  ```
    26  
    27  the container will be connected to the network that is created and managed by the driver (multi-host overlay driver in the above example) or external network plugins.
    28  
    29  Multiple containers can be connected to the same network and the containers in the same network will start to communicate with each other. If the driver/plugin supports multi-host connectivity, then the containers connected to the same multi-host network will be able to communicate seamlessly.