File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,11 @@ while [ -n "${1:-}" ]; do case $1 in
216216 shift
217217 continue ;;
218218
219+ --prune-loaded-images)
220+ prune_loaded_images=1
221+ shift
222+ continue ;;
223+
219224 --ci-values)
220225 shift
221226 if [[ -z " ${1:- } " ]]; then
567572
568573
569574# Load images into kind
570-
571575if [ ${# docker_images_to_load[@]} -ne 0 ]; then
572- printf " %b Loading docker images...\n" ${UNICORN_EMOJI}
573- for img_name in " ${docker_images_to_load[@]} "
574- do
575- " ${demo_dir} /kind" --name diracx-demo load docker-image " ${img_name} "
576+ printf " %b Loading docker images...\n" ${UNICORN_EMOJI}
577+ for img_name in " ${docker_images_to_load[@]} " ; do
578+ " ${demo_dir} /kind" --name diracx-demo load docker-image " ${img_name} "
579+
580+ if [[ ${prune_loaded_images:- 0} -eq 1 ]]; then
581+ printf " %b Pruning ${img_name} locally\n" ${UNICORN_EMOJI}
582+ # Delete the tag (will delete the layers if no other tag is using them)
583+ docker image rm -f " ${img_name} "
584+ fi
576585done
577586
578587
You can’t perform that action at this time.
0 commit comments