From 234232085d898c843217ee9764355ea60d03226e Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 13 May 2023 04:15:39 +0200 Subject: [PATCH] docker: remove dead code --- lib/functions/host/docker.sh | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/lib/functions/host/docker.sh b/lib/functions/host/docker.sh index f29c579bc..8a1c357e2 100644 --- a/lib/functions/host/docker.sh +++ b/lib/functions/host/docker.sh @@ -593,37 +593,12 @@ function docker_cli_launch() { display_alert "Docker Log file for this run" "not found" "err" fi - # Show and help user understand space usage in Docker volumes. - # This is done in a loop; `docker df` fails sometimes (for no good reason). - # @TODO: this is very, very slow when the volumes are full. disable. - # docker_cli_show_armbian_volumes_disk_usage - docker_exit_code="${docker_build_result}" # set outer scope variable -- do NOT exit with error. # return ${docker_build_result} return 0 # always exit with success. caller (CLI) will handle the exit code } -function docker_cli_show_armbian_volumes_disk_usage() { - display_alert "Gathering docker volumes disk usage" "docker system df, wait..." "debug" - sleep_seconds="1" silent_retry="yes" do_with_retries 5 docker_cli_show_armbian_volumes_disk_usage_internal || { - display_alert "Could not get Docker volumes disk usage" "docker failed to report disk usage" "warn" - return 0 # not really a problem, just move on. - } - local docker_volume_usage - docker_volume_usage="$(docker system df -v | grep -e "^armbian-" | grep -v "\b0B" | tr -s " " | cut -d " " -f 1,3 | tr " " ":" | xargs echo || true)" - display_alert "Docker Armbian volume usage" "${docker_volume_usage}" "info" -} - -function docker_cli_show_armbian_volumes_disk_usage_internal() { - # This fails sometimes, for no reason. Test it. - if docker system df -v &> /dev/null; then - return 0 - else - return 1 - fi -} - function docker_purge_deprecated_volumes() { prepare_armbian_mountpoints_description_dict local mountpoint=""