summaryrefslogtreecommitdiffstats
path: root/testapi/update/templates/rm_images.sh
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-10-18 17:30:31 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-10-18 17:30:31 +0800
commit2cea85b0b4b18af73ed6afd7d837d443da43fd2b (patch)
treed9a674e8f79fa1950500ec77989b720a6aad6aad /testapi/update/templates/rm_images.sh
parentcf29e20418012f850d0fa18de5bd24a49f819886 (diff)
rename result_collection_api to testapi
Change-Id: Iec4e3db23cd44f30831e17c127eda74e9d9b5d14 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/update/templates/rm_images.sh')
-rwxr-xr-xtestapi/update/templates/rm_images.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/testapi/update/templates/rm_images.sh b/testapi/update/templates/rm_images.sh
new file mode 100755
index 0000000..6722573
--- /dev/null
+++ b/testapi/update/templates/rm_images.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+number=`docker images | awk 'NR != 1' | grep testapi | wc -l`
+if [ $number -gt 0 ]; then
+ images=`docker images -a | awk 'NR != 1' | grep testapi | awk '{print $1}'`
+ echo "begin to rm images $images"
+ docker images | awk 'NR != 1' | grep testapi | awk '{print $3}' | xargs docker rmi -f &>/dev/null
+fi