Skip to content

Instantly share code, notes, and snippets.

@eryshkov
Last active September 10, 2021 16:00
Show Gist options
  • Save eryshkov/4a7a4f11ac032ce970e4388c892b9c8b to your computer and use it in GitHub Desktop.
Save eryshkov/4a7a4f11ac032ce970e4388c892b9c8b to your computer and use it in GitHub Desktop.
How to List all Docker Container Names and their IPs
docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##';
@eryshkov
Copy link
Author

works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment