Files
dotfiles/dot_config/nushell/nu_scripts/modules/docker/buildah.nu
Cian Hughes 896af887ca Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
2024-11-07 13:52:17 +00:00

31 lines
579 B
Nu

export def "bud img" [] {
buildah images
| from ssv -a
| rename repo tag id created size
| upsert size { |i| $i.size | into filesize }
}
export def "bud ls" [] {
buildah list
| from ssv -a
| rename id builder image-id image container
}
export def "bud ps" [] {
buildah ps
| from ssv -a
| rename id builder image-id image container
}
def "nu-complete bud ps" [] {
bud ps
| select 'CONTAINER ID' "CONTAINER NAME"
| rename value description
}
export def "bud rm" [
id: string@"nu-complete bud ps"
] {
buildah rm $id
}