From 8c4a14c56933196d4bcd314d87d7d386b530cc0d Mon Sep 17 00:00:00 2001 From: Thomas Juerges <203795-tjuerges@users.noreply.gitlab.com> Date: Tue, 25 May 2021 14:48:48 +0200 Subject: [PATCH] L2SS-225: Remove calling a script to remove the images Instead do it in the function itself in order to make it more visible what is actually done. --- bootstrap/sbin/rebuild_system_from_scratch.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bootstrap/sbin/rebuild_system_from_scratch.sh b/bootstrap/sbin/rebuild_system_from_scratch.sh index a81047645..f27635f00 100755 --- a/bootstrap/sbin/rebuild_system_from_scratch.sh +++ b/bootstrap/sbin/rebuild_system_from_scratch.sh @@ -32,7 +32,16 @@ function move_tango_dir_out_of_the_way() function remove_images() { - ${HOME_DIR}/bootstrap/sbin/delete_all_docker_images.sh YES_DELETE_ALL + images="$(for i in $(docker images | egrep -v "REPOSITORY" | awk '{printf "%s:%s\n", $1, $2}'); do printf "%s " ${i}; done)" + if [ ${#images} -eq 0 ]; then + echo -e "\tThere are no images to delete." + else + echo -e "\tWill now delete the following Docker images:" + for image in ${images}; do + printf "\t\t%s\n" ${image} + done + docker rmi "${images}" + fi } function pull_tango() -- GitLab