docker network¶
docker network 命令
Manage networks
Commands:
connect Connect a container to a network
create Create a network
disconnect Disconnect a container from a network
inspect Display detailed information on one or more networks
ls List networks
prune Remove all unused networks
rm Remove one or more networks
docker network ls¶
列出当前docker 所有的 网络
[root@bqdev01 ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
6598e9dce22d bridge bridge local
6b833193ab4a host host local
b6941ae2128c none null local
docker network inspect¶
查看网络详细信息
[
{
"Name": "bridge",
"Id": "6598e9dce22d2d4878f5b63bf8e1f55edcd2afff37dbf24945f52d46587c94ca",
"Created": "2022-11-26T10:35:36.213968379+08:00",
"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": {},
"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": {}
}
]