nix: Migrate scripts

They're a bit slower to start :(.
Hopefully this is something that flakes will help with,
otherwise I'll find another way.
This commit is contained in:
Geoffrey Frogeye 2023-11-26 21:04:58 +01:00
parent 33945f865f
commit 1f61ceb395
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
93 changed files with 178 additions and 478 deletions

View file

@ -0,0 +1,13 @@
#!/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