kolla/tools/cleanup-images
Steven Dake 77a67deeb6 Rename validate-docker-execute with .sh extension
TrivialFix

Change-Id: I3ad67fd802f7fe3ed7deb88eddebe520ff410a4f
2016-03-08 22:14:09 -07:00

15 lines
316 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
IMAGES=`docker images -a -q`
if [[ -z "$IMAGES" ]]; then
echo "No images to cleanup, exit now."
exit 0
fi
docker rmi $@ $IMAGES