Docker – Reporting IP Addresses of Containers

Quick command to report on the IP addresses of all containers running on a Docker server:

docker ps | awk 'NR>1{ print $1 }' | xargs docker inspect -f '{{range .NetworkSettings.Networks}}{{$.Name}}{{" "}}{{.IPAddress}}{{end}}'

Leave a Reply

Your email address will not be published. Required fields are marked *