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>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e21cde0a3c
commit
a580b40802
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user