Compare commits

...
Author SHA1 Message Date
Thomas SharedInboxandClaude Sonnet 4.6 a580b40802 fix: check Docker availability before falling back to local Dagger engine (#329)
When the remote Dagger server is unreachable, setup_dagger_remote.sh
previously exited 0 with a misleading "CI will use the local Dagger
engine" message even when Docker was not running on the host.
This caused a confusing failure in the next step with a docker.sock
"no such file or directory" error rather than a clear early failure.

Add a `docker info` check after all remote probe attempts fail:
if local Docker is also unavailable, exit 1 with an actionable
error message so the root cause is immediately obvious.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 22:37:43 +02:00
+6
View File
@@ -24,6 +24,12 @@ for attempt in $(seq 1 $MAX_PROBE_ATTEMPTS); do
fi
if [ "$attempt" -eq "$MAX_PROBE_ATTEMPTS" ]; then
echo "Warning: No Dagger server responded on $host:$port after $MAX_PROBE_ATTEMPTS attempts"
if ! docker info >/dev/null 2>&1; then
echo "Error: Remote Dagger engine is unavailable AND local Docker daemon is not running."
echo "Cannot proceed. Ensure either the remote server at $host:$port is accessible"
echo "or that Docker is running locally (check: sudo systemctl start docker)."
exit 1
fi
echo "Remote engine unavailable — CI will use the local Dagger engine."
exit 0
fi