You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/08/20 18:30:47 UTC

[incubator-streampipes-installer] branch new_installer updated: [STREAMPIPES-196] fixed clean dangling image command

This is an automated email from the ASF dual-hosted git repository.

wiener pushed a commit to branch new_installer
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-installer.git


The following commit(s) were added to refs/heads/new_installer by this push:
     new 8a74939  [STREAMPIPES-196] fixed clean dangling image command
8a74939 is described below

commit 8a74939c84272b009b1d62c9366c7494f982118d
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Thu Aug 20 20:28:39 2020 +0200

    [STREAMPIPES-196] fixed clean dangling image command
---
 cli/bin/commands/clean | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cli/bin/commands/clean b/cli/bin/commands/clean
index ced838d..63b58e9 100755
--- a/cli/bin/commands/clean
+++ b/cli/bin/commands/clean
@@ -45,7 +45,11 @@ done
 remove_dangling_images(){
   if [ "$(docker images -f dangling=true | grep "apachestreampipes")" ]; then
     info "Removing dangling StreamPipes images"
-    run "docker images -f dangling=true | grep "apachestreampipes" | awk '{print $3}' | xargs docker rmi"
+    dangling_imgs=$(docker images -f dangling=true | grep "apachestreampipes" | awk '{print $3}')
+    for img in "${dangling_imgs[@]}"
+    do
+    	run "docker rmi $img"
+    done
   else
     info "No dangling StreamPipes images found"
   fi