获取单个IP
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container-ID>
获取所有容器IP
docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq)
获取单个IP
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container-ID>
获取所有容器IP
docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq)