Skip to content

Instantly share code, notes, and snippets.

@pilgrim2go
Created June 29, 2018 07:06
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 pilgrim2go/8c5338b86eaa7fc756f5af38991227fc to your computer and use it in GitHub Desktop.
Save pilgrim2go/8c5338b86eaa7fc756f5af38991227fc to your computer and use it in GitHub Desktop.
Docker IP and Container Name
# One line command to list container name with its IP
# From https://superuser.com/questions/1167922/get-list-of-docker-ip-containers
for i in `docker ps -q`; do echo $i; echo " : "; docker inspect $i | grep -i ipaddress | grep -v null | cut -d ':' -f 2; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment