2023-11-26 21:04:58 +01:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#! nix-shell -i bash --pure
|
|
|
|
#! nix-shell -p bash docker gnugrep coreutils
|
2017-09-01 18:39:06 +02:00
|
|
|
|
|
|
|
# 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
|