2014-10-17 12:40:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-07-13 07:11:27 +00:00
|
|
|
# Move to top level directory
|
|
|
|
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
|
|
|
cd "$(dirname "$REAL_PATH")/.."
|
|
|
|
|
2016-05-06 13:51:34 -04:00
|
|
|
. tools/validate-docker-execute.sh
|
2015-07-13 07:11:27 +00:00
|
|
|
|
2016-05-05 11:43:32 -04:00
|
|
|
KOLLA_IMAGES=$(docker images -a --filter "label=kolla_version" --format "{{.ID}}")
|
|
|
|
|
|
|
|
if [[ -z "$KOLLA_IMAGES" ]]; then
|
2015-08-31 04:14:17 +00:00
|
|
|
echo "No images to cleanup, exit now."
|
|
|
|
exit 0
|
|
|
|
fi
|
2016-05-05 11:43:32 -04:00
|
|
|
|
|
|
|
docker rmi $@ $KOLLA_IMAGES
|