Bugfix: fix the wrong extraction of image_id 99/26399/1
authorhelenyao <yaohelan@huawei.com>
Thu, 22 Dec 2016 02:12:36 +0000 (21:12 -0500)
committerhelenyao <yaohelan@huawei.com>
Thu, 22 Dec 2016 02:12:36 +0000 (21:12 -0500)
Change-Id: If1678725a1b417cf0a94265557a6d88aa7c416cb
Signed-off-by: helenyao <yaohelan@huawei.com>
jjb/functest/functest-cleanup.sh

index f8140e0..b03d477 100755 (executable)
@@ -5,7 +5,7 @@
 echo "Cleaning up docker containers/images..."
 FUNCTEST_IMAGE=opnfv/functest
 # Remove containers along with image opnfv/functest:<none>
-dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $1}'))
+dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}'))
 if [[ -n ${dangling_images} ]]; then
     echo "  Removing $FUNCTEST_IMAGE:<none> images and their containers..."
     for image_id in "${dangling_images[@]}"; do