Skip to content
Snippets Groups Projects
Commit f5ff7bfd authored by nimrod's avatar nimrod
Browse files

Add a remove command to wb.

Sometimes I change versions of podman and I need to remove the container
and image and recreate them.
parent a540c0e0
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,22 @@ in_toolbox() {
[ "$(hostname)" = 'toolbox' ]
}
remove() {
not_from_toolbox
if container_exists
then
podman container rm --force "$CONTAINER"
else
echo "Container not found." >&2
fi
if image_exists
then
podman image rm --force "$IMAGE"
else
echo "Image not found." >&2
fi
}
if [ "$#" -eq 0 ]
then
run
......@@ -115,11 +131,12 @@ fi
case "${1:-}" in
-d|--dry-update) dry_update;;
-u|--update) update;;
-l|--list) list;;
-h|--help) usage;;
-s|--kill-server) kill_server;;
-i|--in-workbench) in_toolbox;;
-k|--kill) _kill "${2:-}";;
-l|--list) list;;
-r|--rm|--remove) remove;;
-s|--kill-server) kill_server;;
-u|--update) update;;
*) run "$1";;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment