Last active
August 7, 2018 17:00
-
-
Save chibby0ne/b3465dadcda3ba829b57c34f270719d5 to your computer and use it in GitHub Desktop.
Show Name and IP of currently running docker containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker inspect -f '{{.Name}}{{"\n"}}{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -q) | |
Output would be: | |
container_name_1 | |
ip_container_name_1 | |
container_name_2 | |
ip_container_name_2 | |
... | |
... | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment