aboutsummaryrefslogtreecommitdiff
path: root/tools/cleanup-images
blob: 871afd1d1accaa1978d784262ae3a7107a21492b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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

IMAGES=`docker images -a -q`
if [[ -z "$IMAGES" ]]; then
    echo "No images to cleanup, exit now."
    exit 0
fi
docker rmi $@ $IMAGES