Created
March 15, 2023 18:23
-
-
Save StoneLabs/87a3c3fd4d7f46ed011edb0016684819 to your computer and use it in GitHub Desktop.
Docker view all mounts and volumes of all containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps -a --format '{{ .ID }}' | xargs -I {} docker inspect -f '{{ .Name }}{{ printf "\n" }}{{ range .Mounts }}{{ printf "\n\t" }}{{ .Type }} {{ if eq .Type "bind" }}{{ .Source }}{{ end }}{{ .Name }} => {{ .Destination }}{{ end }}{{ printf "\n" }}' {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment