stop-containers: prune minikube volumes

Prune minikube volumes in addition to orphans & build cache.

Closes-Bug: 2020807
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: If1dcc157e1ce6171779f8143f6fbb7cbd0d02676
This commit is contained in:
Davlet Panech 2023-09-18 15:22:53 -04:00
parent feb90d79a0
commit 725961efc9

View File

@ -21,13 +21,12 @@ fi
load_build_env
stx control stop || true
# Prune minikube's docker, then stop minikube's top-level container
if [[ "$STX_PLATFORM" == "minikube" ]] ; then
profile_args=()
[[ -z "$MINIKUBENAME" ]] || profile_args+=("-p" "$MINIKUBENAME")
if minikube "${profile_args[@]}" status >/dev/null ; then
minikube "${profile_args[@]}" ssh -- 'docker system prune -f'
minikube "${profile_args[@]}" ssh -- 'docker system prune --volumes --force'
minikube "${profile_args[@]}" stop
fi
fi