From 2aa614949f2d2a393c08fb2d08adbce8744f8201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=83rcziem=20=E2=84=A2?= <118485377+spalencsar@users.noreply.github.com> Date: Fri, 3 Oct 2025 12:36:22 +0200 Subject: [PATCH] feat(docker): prompt user after unrecoverable docker start failures; allow abort or continue without docker --- lib/docker.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/docker.sh b/lib/docker.sh index 178fcda..d5a3ce1 100644 --- a/lib/docker.sh +++ b/lib/docker.sh @@ -154,9 +154,21 @@ install_docker() { done if [[ "$_started" != true ]]; then - log_error "docker.service failed to start after $_start_retries attempts. Disabling Docker for remainder of setup to continue other tasks." - # Prevent subsequent steps from attempting Docker-dependent installs - INSTALL_DOCKER=false + log_error "docker.service failed to start after $_start_retries attempts." + # If running interactively, ask whether to continue without Docker or abort. + if [[ -t 0 ]]; then + if ask_yes_no "Docker failed to start. Continue setup without Docker (skip Docker-dependent services)?" "y"; then + log_warning "Continuing setup without Docker. Docker-dependent services will be skipped." + INSTALL_DOCKER=false + else + log_error "Aborting setup because Docker could not be started and user chose to abort." + exit 1 + fi + else + # Non-interactive environment: default to continuing without Docker to avoid blocking + log_warning "Non-interactive shell detected - continuing setup without Docker." + INSTALL_DOCKER=false + fi fi # Configure Docker data directory and optimization