dotfiles/scripts/docker-image-childs
Geoffrey Frogeye ee178b7d57
nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
2023-11-26 23:58:22 +01:00

14 lines
329 B
Plaintext
Executable file

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash docker gnugrep coreutils
# Find the dependent child image from an image
parent="$1"
# From https://stackoverflow.com/a/41634462
for i in $(docker images -q)
do
docker history "$i" | grep -q "$parent" && echo "$i"
done | grep -v "$parent" | sort -u