File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ elif [[ "do" == "$ENVIRONMENT" ]]; then
412412
413413 # remove all images that are no more in use
414414 elif [[ " cleanup" == " $ACTION " ]]; then
415- CLEANABLE_CONTAINERS=$( docker images | grep " <none> " | awk " {print \$ 3} " )
415+ CLEANABLE_CONTAINERS=$( docker images --filter " dangling=true " -q )
416416 if [[ -n " $CLEANABLE_CONTAINERS " ]]; then
417417 # shellcheck disable=SC2086
418418 docker rmi -f $CLEANABLE_CONTAINERS
@@ -448,7 +448,7 @@ elif [[ "do" == "$ENVIRONMENT" ]]; then
448448
449449 # create the full path and ask for confirmation
450450 STATUS_PATH=" $CURRENT_DIR /$REAL_STATUS_FILE "
451- read -r -p " A file $REAL_STATUS_FILE will be created (or override existing). Continue? [Y /n]" input
451+ read -r -p " A file $REAL_STATUS_FILE will be created (or override existing). Continue? [y /n]" input
452452
453453 case $input in
454454 [yY][eE][sS]|[yY])
@@ -465,7 +465,7 @@ elif [[ "do" == "$ENVIRONMENT" ]]; then
465465 echo " " >> " $STATUS_PATH "
466466 echo " ### Currently existing images" >> " $STATUS_PATH "
467467 echo " " >> " $STATUS_PATH "
468- docker images >> " $STATUS_PATH "
468+ docker images --format " table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}} " >> " $STATUS_PATH "
469469 echo " " >> " $STATUS_PATH "
470470 ;;
471471 * )
You can’t perform that action at this time.
0 commit comments