Add network interal mode
Signed-off-by: Chun Chen <ramichen@tencent.com> Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: b70954e60a15d09756bd6b00a6fadedc64829477 Component: engine
This commit is contained in:
committed by
David Calavera
parent
b85989684a
commit
9c6798de6b
@ -114,6 +114,7 @@ This section lists each version from latest to oldest. Each listing includes a
|
||||
* `POST /containers/create` now allows you to set the static IPv4 and/or IPv6 address for the container.
|
||||
* `POST /networks/(id)/connect` now allows you to set the static IPv4 and/or IPv6 address for the container.
|
||||
* `GET /info` now includes the number of containers running, stopped, and paused.
|
||||
* `POST /networks/create` now supports restricting external access to the network by setting the `internal` field.
|
||||
|
||||
### v1.21 API changes
|
||||
|
||||
|
||||
@ -2985,13 +2985,15 @@ Content-Type: application/json
|
||||
|
||||
{
|
||||
"Name":"isolated_nw",
|
||||
"Driver":"bridge"
|
||||
"Driver":"bridge",
|
||||
"IPAM":{
|
||||
"Config":[{
|
||||
"Subnet":"172.20.0.0/16",
|
||||
"IPRange":"172.20.10.0/24",
|
||||
"Gateway":"172.20.10.11"
|
||||
}]
|
||||
},
|
||||
"Internal":true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ parent = "smn_cli"
|
||||
-d --driver=DRIVER Driver to manage the Network bridge or overlay. The default is bridge.
|
||||
--gateway=[] ipv4 or ipv6 Gateway for the master subnet
|
||||
--help Print usage
|
||||
--internal Restricts external access to the network
|
||||
--ip-range=[] Allocate container ip from a sub-range
|
||||
--ipam-driver=default IP Address Management Driver
|
||||
-o --opt=map[] Set custom network plugin options
|
||||
@ -120,6 +121,11 @@ docker network create -d overlay
|
||||
```
|
||||
Be sure that your subnetworks do not overlap. If they do, the network create fails and Engine returns an error.
|
||||
|
||||
### Network internal mode
|
||||
|
||||
By default, when you connect a container to an `overlay` network, Docker also connects a bridge network to it to provide external connectivity.
|
||||
If you want to create an externally isolated `overlay` network, you can specify the `--internal` option.
|
||||
|
||||
## Related information
|
||||
|
||||
* [network inspect](network_inspect.md)
|
||||
|
||||
Reference in New Issue
Block a user