Skip to content

Instantly share code, notes, and snippets.

View mlinhard's full-sized avatar

Michal Linhard mlinhard

View GitHub Profile
@mlinhard
mlinhard / docker_desc.sh
Last active April 19, 2024 15:53
Shell script to find docker image descendants
#!/bin/bash
parent_short_id=$1
parent_id=`docker inspect --format '{{.Id}}' $1`
get_kids() {
local parent_id=$1
docker inspect --format='ID {{.Id}} PAR {{.Parent}}' $(docker images -a -q) | grep "PAR ${parent_id}" | sed -E "s/ID ([^ ]*) PAR ([^ ]*)/\1/g"
}
print_kids() {

Keybase proof

I hereby claim:

  • I am mlinhard on github.
  • I am mlinhard (https://keybase.io/mlinhard) on keybase.
  • I have a public key ASDEzXTMW4ULMEdz8M93Ig2iWYY1oej32mMMTogbS6NLrQo

To claim this, I am signing this object: