Skip to content

Instantly share code, notes, and snippets.

@mbentley
Created August 31, 2016 12:11
Show Gist options
  • Save mbentley/76c8b3929562a1082d9dd089fb6e95e9 to your computer and use it in GitHub Desktop.
Save mbentley/76c8b3929562a1082d9dd089fb6e95e9 to your computer and use it in GitHub Desktop.
Get docker volume mounts via `docker inspect`
for i in $(docker ps -aq)
do
echo -n "Volumes for ${i}: "
docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' ${i}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment