mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
docker: remove dead code
This commit is contained in:
@@ -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=""
|
||||
|
||||
Reference in New Issue
Block a user