Created
March 18, 2019 21:11
-
-
Save maxclaus/3e64a3422564f88b5629da5a0ccd4fc1 to your computer and use it in GitHub Desktop.
Docker - list all containers' ip and find container by ip
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
for i in $(docker ps -aq); do docker inspect -f '{{.Name}}: IP={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$i"; done | grep <ip-here> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment