Skip to content

Commit a29c7b4

Browse files
author
Sengorius
committed
fixed "docker images" usage after docker default output has updated
1 parent 0fcea6d commit a29c7b4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

DockerExec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
*)

0 commit comments

Comments
 (0)