1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
| # list network
λ docker network ls
NETWORK ID NAME DRIVER SCOPE
21a5e8b305c4 bridge bridge local
e6aafe917f13 host host local
d2de5c3c084c none null local
# check network details
λ docker network inspect bridge
[
{
"Name": "bridge",
"Id": "21a5e8b305c415ab903d86689778d91c7968ab9ab350e0f0885be8a81d0095cc",
"Created": "2020-06-08T04:21:05.390246004Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"0ea4fead9a248c57d0d5053198ea5ba5eedd32f6636dd834d763dddec7bce9fd": {
"Name": "compute1",
"EndpointID": "3165851a116e074f7564411a351e74570c164af5610ebf8f45183840eb869199",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
},
"937fa919cd2aacc47034648f739c29fec00a09e14f8363a8a68d5ac3ce786e15": {
"Name": "compute2",
"EndpointID": "22e1551440dcdd913dc59612d9757b846a1b7c977f0f836bf5b826ef4da13bab",
"MacAddress": "02:42:ac:11:00:03",
"IPv4Address": "172.17.0.3/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
# create a network(default create a network whose network type is bridge)
docker networ create br-int
# create a host network
docker network create --driver host host-net
# --driver
- bridge
- host
- overlay
- macvlan
- none
- Network Plugins
|