-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network: multiple nets with --network #19566
Conversation
Corrects a false statement that you can't connect to multiple networks with the `--network` flag. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -139,8 +139,9 @@ A container receives an IP address out of the IP subnet of the network. | |||
The Docker daemon performs dynamic subnetting and IP address allocation for containers. | |||
Each network also has a default subnet mask and gateway. | |||
|
|||
When a container starts, it can only attach to a single network, using the `--network` flag. | |||
You can connect a running container to additional networks using the `docker network connect` command. | |||
You can connect a running container to multiple networks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be valuable to detail how the advanced --network
format can be used to attach to multiple networks. I think the doc doesn't mention that right now. Here's the relevant PRs:
- Add missing opts to --network advanced syntax cli#4419
- [carry 317] Cli change to pass driver specific options to docker run cli#1767
I think it might worth also mentioning how the CLI interprets top-level flags when multiple networks are specified.
Signed-off-by: David Karlsson 35727626+dvdksn@users.noreply.github.com
Description
Corrects a false statement that you can't connect to multiple networks
with the
--network
flag.Related issues or tickets
Closes #19533