Skip to content

Commit fb3182b

Browse files
authored
Merge pull request #19566 from dvdksn/multiple-nets
network: multiple nets with --network
2 parents 2e8f7b4 + 4028c50 commit fb3182b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/network/_index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ A container receives an IP address out of the IP subnet of the network.
139139
The Docker daemon performs dynamic subnetting and IP address allocation for containers.
140140
Each network also has a default subnet mask and gateway.
141141
142-
When a container starts, it can only attach to a single network, using the `--network` flag.
143-
You can connect a running container to additional networks using the `docker network connect` command.
142+
You can connect a running container to multiple networks,
143+
either by passing the `--network` flag multiple times when creating the container,
144+
or using the `docker network connect` command for already running containers.
144145
In both cases, you can use the `--ip` or `--ip6` flags to specify the container's IP address on that particular network.
145146
146147
In the same way, a container's hostname defaults to be the container's ID in Docker.

0 commit comments

Comments
 (0)