Ημερήσια αρχεία: 21 Σεπτεμβρίου 2018


How to List all Docker Container Names and their IPs 4

The following command will make a list with all docker container names and their respective IPs.
For the containers that have multiple IPs it will printed them on the same row as their name.


docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##';