mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixing mismatched network name.
Using `my-net` to be consistent with: https://docs.docker.com/engine/reference/run/ Signed-off-by: Robert Wallis <smilingrob@gmail.com>
This commit is contained in:
parent
e5a79c5d99
commit
8779a4ca62
1 changed files with 3 additions and 3 deletions
|
@ -326,17 +326,17 @@ Guide.
|
||||||
### Connect a container to a network (--net)
|
### Connect a container to a network (--net)
|
||||||
|
|
||||||
When you start a container use the `--net` flag to connect it to a network.
|
When you start a container use the `--net` flag to connect it to a network.
|
||||||
This adds the `busybox` container to the `mynet` network.
|
This adds the `busybox` container to the `my-net` network.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run -itd --net=my-multihost-network busybox
|
$ docker run -itd --net=my-net busybox
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also choose the IP addresses for the container with `--ip` and `--ip6`
|
You can also choose the IP addresses for the container with `--ip` and `--ip6`
|
||||||
flags when you start the container on a user-defined network.
|
flags when you start the container on a user-defined network.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run -itd --net=my-multihost-network --ip=10.10.9.75 busybox
|
$ docker run -itd --net=my-net --ip=10.10.9.75 busybox
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to add a running container to a network use the `docker network connect` subcommand.
|
If you want to add a running container to a network use the `docker network connect` subcommand.
|
||||||
|
|
Loading…
Add table
Reference in a new issue