Created
July 27, 2016 07:13
-
-
Save royingantaginting/fffd71cbba082cddbccc8d07f97a12fe to your computer and use it in GitHub Desktop.
Get IP address of a container
This file contains hidden or 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
#!/bin/bash | |
case $# in | |
0) | |
echo "Usage: $0 (container name)" | |
exit 1 | |
;; | |
*) | |
docker inspect -f '{{ .NetworkSettings.IPAddress }}' $@ | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment