-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More doc updates will follow Signed-off-by: Madhu Venugopal <madhu@docker.com>
- Loading branch information
Showing
21 changed files
with
994 additions
and
901 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!--[metadata]> | ||
+++ | ||
title = "network connect" | ||
description = "The network connect command description and usage" | ||
keywords = ["network, connect"] | ||
[menu.main] | ||
parent = "smn_cli" | ||
+++ | ||
<![end-metadata]--> | ||
|
||
# network connect | ||
|
||
Usage: docker network connect [OPTIONS] NETWORK CONTAINER | ||
|
||
Connects a container to a network | ||
|
||
--help=false Print usage | ||
|
||
Connects a running container to a network. This enables instant communication with other containers belonging to the same network. | ||
|
||
``` | ||
$ docker network create -d overlay multi-host-network | ||
$ docker run -d --name=container1 busybox top | ||
$ docker network connect multi-host-network container1 | ||
``` | ||
|
||
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. | ||
|
||
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!--[metadata]> | ||
+++ | ||
title = "network create" | ||
description = "The network create command description and usage" | ||
keywords = ["network, create"] | ||
[menu.main] | ||
parent = "smn_cli" | ||
+++ | ||
<![end-metadata]--> | ||
|
||
# network create | ||
|
||
Usage: docker network create [OPTIONS] NETWORK-NAME | ||
|
||
Creates a new network with a name specified by the user | ||
|
||
-d, --driver= Driver to manage the Network | ||
--help=false Print usage | ||
|
||
Creates a new network that containers can connect to. If the driver supports multi-host networking, the created network will be made available across all the hosts in the cluster. Daemon will do its best to identify network name conflicts. But its the users responsibility to make sure network name is unique across the cluster. You create a network and then configure the container to use it, for example: | ||
|
||
``` | ||
$ docker network create -d overlay multi-host-network | ||
$ docker run -itd --net=multi-host-network busybox | ||
``` | ||
|
||
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. | ||
|
||
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. | ||
|
||
*Note*: UX needs enhancement to accept network options to be passed to the drivers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!--[metadata]> | ||
+++ | ||
title = "network disconnect" | ||
description = "The network disconnect command description and usage" | ||
keywords = ["network, disconnect"] | ||
[menu.main] | ||
parent = "smn_cli" | ||
+++ | ||
<![end-metadata]--> | ||
|
||
# network disconnect | ||
|
||
Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER | ||
|
||
Disconnects a container from a network | ||
|
||
--help=false Print usage | ||
|
||
Disconnects a running container from a network. | ||
|
||
``` | ||
$ docker network create -d overlay multi-host-network | ||
$ docker run -d --net=multi-host-network --name=container1 busybox top | ||
$ docker network disconnect multi-host-network container1 | ||
``` | ||
|
||
the container will be disconnected from the network. |
Oops, something went wrong.