方法一:
进容器里面ip add
方法二:
docker network inspect bridge
[root@mabos grafana]# docker network inspect bridge
[{"Name": "bridge","Id": "1e9bbb6dbcc13bab41c4a6f52f032275a0e84f58809c27d7dab992e25df8013b","Created": "2023-11-06T09:03:58.704182932+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": {"e2bd80f5115f8173896781465b86cc5e54f3889bd860f46a33e38f7e1a6c2cb8": {"Name": "zen_wilson","EndpointID": "39bc8a49f4610fcc31c5c62a6faa1d9a0cda3465575c976921d3b77cacc9d1af","MacAddress": "02:42:ac:11:00:02","IPv4Address": "172.17.0.2/16","IPv6Address": ""}},