Skip to content

Instantly share code, notes, and snippets.

@eryshkov
Created October 1, 2022 18:57
Show Gist options
  • Save eryshkov/4023a2ff7d38693b30138a46fa91ac2e to your computer and use it in GitHub Desktop.
Save eryshkov/4023a2ff7d38693b30138a46fa91ac2e to your computer and use it in GitHub Desktop.
Get all docker IPs
docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##';
@eryshkov
Copy link
Author

eryshkov commented Oct 1, 2022

Use this after docker-compose up to get containers IPs

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