Skip to content

Instantly share code, notes, and snippets.

@osallou
Forked from mbentley/get_volume_mounts.sh
Created October 23, 2017 10:39
Show Gist options
  • Save osallou/b98bb0a8669d099395fd4d735e524ccf to your computer and use it in GitHub Desktop.
Save osallou/b98bb0a8669d099395fd4d735e524ccf 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