ci(grid-rs): surface docker daemon diagnostics on wait-step failure
Mirrors the verbose wait-for-docker block from build.yaml so future "failed to connect to docker" failures print socket permissions, docker-related env vars, and full `docker info` output instead of a single unhelpful line.
This commit is contained in:
parent
f671114105
commit
141956b727
1 changed files with 18 additions and 1 deletions
|
|
@ -49,14 +49,31 @@ jobs:
|
|||
|
||||
- name: Wait for Docker daemon
|
||||
run: |
|
||||
# act_runner mounts the host docker socket into the job, but
|
||||
# the daemon side sometimes takes a moment to answer. Poll
|
||||
# `docker info` until it responds so the login/build steps
|
||||
# below don't race the socket and fail with "unable to
|
||||
# connect to docker". Mirrors the diagnostics in build.yaml
|
||||
# so failures surface *why* the socket is unreachable.
|
||||
sock="${DOCKER_HOST:-unix:///var/run/docker.sock}"
|
||||
echo "Using DOCKER_HOST=${sock}"
|
||||
|
||||
for i in $(seq 1 30); do
|
||||
if docker info >/dev/null 2>&1; then
|
||||
echo "Docker daemon reachable after ${i}s"
|
||||
exit 0
|
||||
fi
|
||||
echo "Waiting for Docker daemon... ($i/30)"
|
||||
sleep 1
|
||||
done
|
||||
echo "Docker daemon never became reachable" >&2
|
||||
|
||||
echo "Docker daemon never became reachable — diagnostics:" >&2
|
||||
echo "--- ls -l /var/run/docker.sock ---" >&2
|
||||
ls -l /var/run/docker.sock 2>&1 || true
|
||||
echo "--- env | grep -i docker ---" >&2
|
||||
env | grep -i docker 2>&1 || true
|
||||
echo "--- docker info (verbose) ---" >&2
|
||||
docker info 2>&1 || true
|
||||
exit 1
|
||||
|
||||
- name: Generate image tag
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue