Skip to content

Instantly share code, notes, and snippets.

@aya986
Created August 10, 2023 07:59
Show Gist options
  • Save aya986/53addbf387495e1f49cffb78d5be9e66 to your computer and use it in GitHub Desktop.
Save aya986/53addbf387495e1f49cffb78d5be9e66 to your computer and use it in GitHub Desktop.
Get IPAddress and docker name for all docker containers
docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment