From 8d694725d165193161b7bd1adf020d8ef89946f9 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Fri, 4 Aug 2023 13:51:48 +0200 Subject: [PATCH] Add clean --- .github/fiware/image-clone.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh index d9dc7f9..83f3e8d 100755 --- a/.github/fiware/image-clone.sh +++ b/.github/fiware/image-clone.sh @@ -23,8 +23,7 @@ function clone { } for i in "$@" ; do - if [[ $i == "docker" ]]; then - + if [[ $i == "docker" ]]; then clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true fi if [[ $i == "quay" ]]; then @@ -32,3 +31,10 @@ for i in "$@" ; do fi echo "" done + + +for i in "$@" ; do + if [[ $i == "clean" ]]; then + docker rmi -f $(docker images -a -q) | true + fi +done