wrapper to work out which container has anonymous mounts in docker
This commit is contained in:
3
docker-anonymous-mounts
Executable file
3
docker-anonymous-mounts
Executable 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"'
|
||||||
Reference in New Issue
Block a user