kolla-ansible/tools/cleanup-images
Mauricio Lima e39074421e Add extension to file
TrivialFix

Change-Id: I161526927ae32f2bbfec1ade610f7b712f4c5163
2016-05-06 13:53:50 -04:00

17 lines
384 B
Bash
Executable File

#!/bin/bash
# Move to top level directory
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
. tools/validate-docker-execute.sh
KOLLA_IMAGES=$(docker images -a --filter "label=kolla_version" --format "{{.ID}}")
if [[ -z "$KOLLA_IMAGES" ]]; then
echo "No images to cleanup, exit now."
exit 0
fi
docker rmi $@ $KOLLA_IMAGES