Skip to content

Instantly share code, notes, and snippets.

@SuperCipher
Created April 26, 2022 11:37
Show Gist options
  • Save SuperCipher/be50793e1b6cd9dabb52ac27099c2d1e to your computer and use it in GitHub Desktop.
Save SuperCipher/be50793e1b6cd9dabb52ac27099c2d1e to your computer and use it in GitHub Desktop.
get all container name and ip
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