I\'m trying to remove an image and I get:
# docker rmi f50f9524513f
Failed to remove image (f50f9524513f): Error response from daemon: conflict: unable to
I cooked up this to recursively find children, their repo tags, and print what they're doing:
docker_img_tree() {
for i in $(docker image ls -qa) ; do
[ -f "/tmp/dii-$i" ] || ( docker image inspect $i > /tmp/dii-$i)
if grep -qiE 'Parent.*'$1 /tmp/dii-$i ; then
echo "$2============= $i (par=$1)"
awk '/(Cmd|Repo).*\[/,/\]/' /tmp/dii-$i | sed "s/^/$2/"
docker_img_tree $i $2===
fi
done
}
Don't forget to delete /tmp/dii-* if your host isn't secure.