summaryrefslogtreecommitdiffstats
path: root/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh')
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh b/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh
deleted file mode 100644
index 6b155f7fa..000000000
--- a/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-# Stop any running containers
-running_container_ids=`docker ps -q`
-if test -n "$running_container_ids"
-then
- docker stop $running_container_ids
-fi
-
-# Delete all containers
-container_ids=`docker ps -a -q`
-if test -n "$container_ids"
-then
- docker rm -f -v $container_ids
-fi
-
-# Delete all images (forcefully)
-image_ids=`docker images -q`
-if test -n "$image_ids"
-then
- # Taken from: https://gist.github.com/brianclements/f72b2de8e307c7b56689#gistcomment-1443144
- docker rmi $(docker images | grep "$2/\|/$2 \| $2 \|$2 \|$2-\|$2_" | awk '{print $1 ":" $2}') 2>/dev/null || echo "No images matching \"$2\" left to purge."
-fi