wrapper to work out which container has anonymous mounts in docker

This commit is contained in:
2025-12-11 22:01:18 +11:00
parent aeb620b6d7
commit 040f743ff0

3
docker-anonymous-mounts Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker ps -q | xargs -I{} sh -c 'mounts=$(docker inspect {} --format "{{range .Mounts}}{{if eq .Type \"volume\"}}{{.Destination}} {{.Name}} {{end}}{{end}}"); [ -n "$mounts" ] && echo "$(docker inspect --format '{{.Name}}' {}) $mounts"'