Skip to content

Instantly share code, notes, and snippets.

@chibby0ne
Last active August 7, 2018 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chibby0ne/b3465dadcda3ba829b57c34f270719d5 to your computer and use it in GitHub Desktop.
Save chibby0ne/b3465dadcda3ba829b57c34f270719d5 to your computer and use it in GitHub Desktop.
Show Name and IP of currently running docker containers
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