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
216
216
shift
217
217
continue ;;
218
218
219
+ --prune-loaded-images)
220
+ prune_loaded_images=1
221
+ shift
222
+ continue ;;
223
+
219
224
--ci-values)
220
225
shift
221
226
if [[ -z " ${1:- } " ]]; then
567
572
568
573
569
574
# Load images into kind
570
-
571
575
if [ ${# 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
576
585
done
577
586
578
587
You can’t perform that action at this time.
0 commit comments