From 1aee8de46e27471b7b786cf351dada2c9e574796 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 1 Dec 2021 15:23:38 -0800 Subject: [PATCH] Move docker prune action to build script Signed-off-by: Victor Morales --- integrations/docker/build.sh | 1 + integrations/docker/images/build-all.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/build.sh b/integrations/docker/build.sh index 870a7b9aa3c237..6c4a1a2dc26f98 100755 --- a/integrations/docker/build.sh +++ b/integrations/docker/build.sh @@ -73,6 +73,7 @@ if [[ ${*/--no-cache//} != "${*}" ]]; then fi docker build "${BUILD_ARGS[@]}" --build-arg VERSION="$VERSION" -t "$ORG/$IMAGE:$VERSION" . +docker image prune --force [[ ${*/--latest//} != "${*}" ]] && { docker tag "$ORG"/"$IMAGE":"$VERSION" "$ORG"/"$IMAGE":latest diff --git a/integrations/docker/images/build-all.sh b/integrations/docker/images/build-all.sh index b7ec3354f428a3..2ff590b111d011 100755 --- a/integrations/docker/images/build-all.sh +++ b/integrations/docker/images/build-all.sh @@ -26,4 +26,3 @@ find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Docker ./build.sh "$@" popd >/dev/null done -docker image prune --force