9024564066
Co-Authored-By: Carlos Cesario <carloscesario@gmail.com> Change-Id: I3e9652e1cac156f822b388d2b9fd910180b4a892 Closes-Bug: #1551933
17 lines
381 B
Bash
Executable File
17 lines
381 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
|
|
|
|
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
|