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
|
(base) lvwei@lvweideMacBook-Pro rustdemo % docker network connect mynet newapp
(base) lvwei@lvweideMacBook-Pro rustdemo % docker restart newapp
newapp
(base) lvwei@lvweideMacBook-Pro rustdemo % docker network inspect mynet
[
{
"Name": "mynet",
"Id": "297e608290472a23fec759a75e6b323771773d7bcfbaada11aa0c9fd285d8a76",
"Created": "2023-12-08T05:42:23.346429009Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.20.0.0/16",
"Gateway": "172.20.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"1178ee9492f132618c7ee39892de10a22afa237d1e85583b9fe02302397eada0": {
"Name": "mysql_1",
"EndpointID": "8d8462243ff73c8529d6a7a63c18534a0a1d280a167a930328f58c522e8b6d83",
"MacAddress": "02:42:ac:14:00:02",
"IPv4Address": "172.20.0.2/16",
"IPv6Address": ""
},
"2019aa4e114e42bbbf594341a5d8bcb95ec463150c738e467fab51e2f34181e7": {
"Name": "newapp",
"EndpointID": "1d3796871a9edd6a3c4d7b55fd4bb17b4e3b889dffcf1b4b84f18b209c87742e",
"MacAddress": "02:42:ac:14:00:04",
"IPv4Address": "172.20.0.4/16",
"IPv6Address": ""
},
"f1a5aeb830455e93b4e31933f78c282a15ef13247dfcfbd7f98a9da825fe5d6e": {
"Name": "mysql",
"EndpointID": "110be5353f54e8cd2db9fdbbf904e0e027b963e4ca54486715a41355348de2d8",
"MacAddress": "02:42:ac:14:00:03",
"IPv4Address": "172.20.0.3/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
|