feat(docker): prompt user after unrecoverable docker start failures; allow abort or continue without docker
This commit is contained in:
@@ -154,9 +154,21 @@ install_docker() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$_started" != true ]]; then
|
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."
|
log_error "docker.service failed to start after $_start_retries attempts."
|
||||||
# Prevent subsequent steps from attempting Docker-dependent installs
|
# If running interactively, ask whether to continue without Docker or abort.
|
||||||
INSTALL_DOCKER=false
|
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
|
fi
|
||||||
|
|
||||||
# Configure Docker data directory and optimization
|
# Configure Docker data directory and optimization
|
||||||
|
|||||||
Reference in New Issue
Block a user