mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update /containers/create remote API docs
- Show how to pass the networking config in POST containers/create body Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
a0e7e13766
commit
30859c3456
4 changed files with 70 additions and 17 deletions
|
@ -298,6 +298,17 @@ Create a container
|
||||||
"CgroupParent": "",
|
"CgroupParent": "",
|
||||||
"VolumeDriver": "",
|
"VolumeDriver": "",
|
||||||
"ShmSize": 67108864
|
"ShmSize": 67108864
|
||||||
|
},
|
||||||
|
"NetworkingConfig": {
|
||||||
|
"EndpointsConfig": {
|
||||||
|
"isolated_nw" : {
|
||||||
|
"IPAMConfig": {
|
||||||
|
"IPv4Address":"172.20.30.33",
|
||||||
|
"IPv6Address":"2001:db8:abcd::3033"
|
||||||
|
},
|
||||||
|
"Links":["container_1", "container_2"],
|
||||||
|
"Aliases":["server_x", "server_y"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2952,11 +2963,17 @@ Content-Type: application/json
|
||||||
"Name":"isolated_nw",
|
"Name":"isolated_nw",
|
||||||
"Driver":"bridge",
|
"Driver":"bridge",
|
||||||
"IPAM":{
|
"IPAM":{
|
||||||
"Config":[{
|
"Config":[
|
||||||
"Subnet":"172.20.0.0/16",
|
{
|
||||||
"IPRange":"172.20.10.0/24",
|
"Subnet":"172.20.0.0/16",
|
||||||
"Gateway":"172.20.10.11"
|
"IPRange":"172.20.10.0/24",
|
||||||
}],
|
"Gateway":"172.20.10.11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Subnet":"2001:db8:abcd::/64",
|
||||||
|
"Gateway":"2001:db8:abcd::1011"
|
||||||
|
}
|
||||||
|
],
|
||||||
"Options": {
|
"Options": {
|
||||||
"foo": "bar"
|
"foo": "bar"
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,6 +317,17 @@ Create a container
|
||||||
"CgroupParent": "",
|
"CgroupParent": "",
|
||||||
"VolumeDriver": "",
|
"VolumeDriver": "",
|
||||||
"ShmSize": 67108864
|
"ShmSize": 67108864
|
||||||
|
},
|
||||||
|
"NetworkingConfig": {
|
||||||
|
"EndpointsConfig": {
|
||||||
|
"isolated_nw" : {
|
||||||
|
"IPAMConfig": {
|
||||||
|
"IPv4Address":"172.20.30.33",
|
||||||
|
"IPv6Address":"2001:db8:abcd::3033"
|
||||||
|
},
|
||||||
|
"Links":["container_1", "container_2"],
|
||||||
|
"Aliases":["server_x", "server_y"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3005,13 +3016,19 @@ Content-Type: application/json
|
||||||
{
|
{
|
||||||
"Name":"isolated_nw",
|
"Name":"isolated_nw",
|
||||||
"Driver":"bridge",
|
"Driver":"bridge",
|
||||||
"EnableIPv6": false,
|
"EnableIPv6": true,
|
||||||
"IPAM":{
|
"IPAM":{
|
||||||
"Config":[{
|
"Config":[
|
||||||
"Subnet":"172.20.0.0/16",
|
{
|
||||||
"IPRange":"172.20.10.0/24",
|
"Subnet":"172.20.0.0/16",
|
||||||
"Gateway":"172.20.10.11"
|
"IPRange":"172.20.10.0/24",
|
||||||
}],
|
"Gateway":"172.20.10.11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Subnet":"2001:db8:abcd::/64",
|
||||||
|
"Gateway":"2001:db8:abcd::1011"
|
||||||
|
}
|
||||||
|
],
|
||||||
"Options": {
|
"Options": {
|
||||||
"foo": "bar"
|
"foo": "bar"
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,6 +318,17 @@ Create a container
|
||||||
"CgroupParent": "",
|
"CgroupParent": "",
|
||||||
"VolumeDriver": "",
|
"VolumeDriver": "",
|
||||||
"ShmSize": 67108864
|
"ShmSize": 67108864
|
||||||
|
},
|
||||||
|
"NetworkingConfig": {
|
||||||
|
"EndpointsConfig": {
|
||||||
|
"isolated_nw" : {
|
||||||
|
"IPAMConfig": {
|
||||||
|
"IPv4Address":"172.20.30.33",
|
||||||
|
"IPv6Address":"2001:db8:abcd::3033"
|
||||||
|
},
|
||||||
|
"Links":["container_1", "container_2"],
|
||||||
|
"Aliases":["server_x", "server_y"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3006,13 +3017,19 @@ Content-Type: application/json
|
||||||
{
|
{
|
||||||
"Name":"isolated_nw",
|
"Name":"isolated_nw",
|
||||||
"Driver":"bridge",
|
"Driver":"bridge",
|
||||||
"EnableIPv6": false,
|
"EnableIPv6": true,
|
||||||
"IPAM":{
|
"IPAM":{
|
||||||
"Config":[{
|
"Config":[
|
||||||
"Subnet":"172.20.0.0/16",
|
{
|
||||||
"IPRange":"172.20.10.0/24",
|
"Subnet":"172.20.0.0/16",
|
||||||
"Gateway":"172.20.10.11"
|
"IPRange":"172.20.10.0/24",
|
||||||
}],
|
"Gateway":"172.20.10.11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Subnet":"2001:db8:abcd::/64",
|
||||||
|
"Gateway":"2001:db8:abcd::1011"
|
||||||
|
}
|
||||||
|
],
|
||||||
"Options": {
|
"Options": {
|
||||||
"foo": "bar"
|
"foo": "bar"
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,8 @@ could be added:
|
||||||
$ iptables -I DOCKER -i ext_if ! -s 8.8.8.8 -j DROP
|
$ iptables -I DOCKER -i ext_if ! -s 8.8.8.8 -j DROP
|
||||||
```
|
```
|
||||||
|
|
||||||
|
where *ext_if* is the name of the interface providing external connectivity to the host.
|
||||||
|
|
||||||
## Communication between containers
|
## Communication between containers
|
||||||
|
|
||||||
Whether two containers can communicate is governed, at the operating system level, by two factors.
|
Whether two containers can communicate is governed, at the operating system level, by two factors.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue