Created
April 26, 2022 11:37
-
-
Save SuperCipher/be50793e1b6cd9dabb52ac27099c2d1e to your computer and use it in GitHub Desktop.
get all container name and ip
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
https://stackoverflow.com/a/63023383/3422861 | |
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} %tab% {{.Name}}' $(docker ps -aq | |
) | sed 's#%tab%#\t#g' | sed 's#/##g' | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment