Created
June 29, 2018 07:06
-
-
Save pilgrim2go/8c5338b86eaa7fc756f5af38991227fc to your computer and use it in GitHub Desktop.
Docker IP and Container Name
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
# 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