ensure the script will not fail; keep cached docker images

pull/9726/head
Predrag Rogic 2020-11-17 19:57:59 +00:00
parent 1b52103df9
commit 973640c7a5
No known key found for this signature in database
GPG Key ID: F1FF5748C4855229
1 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ killall java
# clean minikube left overs
echo -e "\ncleanup minikube..."
killall minikube >/dev/null 2>&1
killall minikube >/dev/null 2>&1 || true
USERS="$(lslogins --user-accs --noheadings --output=USER)"
for user in $USERS; do
if sudo su - $user -c "minikube delete --all --purge" >/dev/null 2>&1; then
@ -49,19 +49,19 @@ done
# clean docker left overs
echo -e "\ncleanup docker..."
docker kill $(docker ps -aq) >/dev/null 2>&1 || true
docker system prune --all --volumes --force || true
docker system prune --volumes --force || true
# clean KVM left overs
echo -e "\ncleanup kvm..."
overview() {
echo -e "\n - KVM domains:"
sudo virsh list --all
sudo virsh list --all || true
echo " - KVM pools:"
sudo virsh pool-list --all
sudo virsh pool-list --all || true
echo " - KVM networks:"
sudo virsh net-list --all
sudo virsh net-list --all || true
echo " - host networks:"
sudo ip link show
sudo ip link show || true
}
echo -e "\nbefore the cleanup:"
overview