Skip to content

Commit 3af78a7

Browse files
authored
Fix DinD startup failures (#36835)
1 parent 715a482 commit 3af78a7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/actions/dind-up-action/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ inputs:
5757
default: 10s
5858
wait-timeout:
5959
default: "180"
60+
dind-image:
61+
description: "DinD image. Use a fixed version tag to avoid issues."
62+
default: "docker:27-dind"
6063

6164
# --- NEW: Optional Setup & Verification Steps ---
6265
cleanup-dind-on-start:
@@ -129,7 +132,11 @@ runs:
129132
130133
docker volume create --name "${STORAGE_VOL}" --label "com.github.dind=1" --label "com.github.repo=${GITHUB_REPOSITORY}" >/dev/null
131134
docker volume create --name "${EXECROOT_VOL}" --label "com.github.dind=1" --label "com.github.repo=${GITHUB_REPOSITORY}" >/dev/null
135+
136+
# Clean up any existing DinD containers
137+
docker ps -a -q --filter "label=com.github.dind=1" | xargs -r docker rm -f -v 2>/dev/null || true
132138
docker rm -f -v "$NAME" 2>/dev/null || true
139+
sleep 2
133140
134141
NET_ARGS=""
135142
PUBLISH_ARGS="-p ${BIND}:${PORT}:${PORT}"
@@ -138,6 +145,8 @@ runs:
138145
PUBLISH_ARGS=""
139146
fi
140147
148+
IMAGE="${{ inputs.dind-image || 'docker:27-dind' }}"
149+
141150
docker run -d --privileged --name "$NAME" \
142151
--cgroupns=host \
143152
-e DOCKER_TLS_CERTDIR= \
@@ -152,10 +161,11 @@ runs:
152161
--health-interval=${HI} \
153162
--health-retries=${HR} \
154163
--health-start-period=${HSP} \
155-
docker:dind \
164+
"${IMAGE}" \
156165
--host=tcp://0.0.0.0:${PORT} \
157166
--host=unix:///var/run/docker.sock \
158167
--storage-driver=${SD} \
168+
--iptables=false \
159169
--exec-root=/execroot ${EXTRA}
160170
161171
{

.github/workflows/beam_PreCommit_Python_Coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797
id: dind
9898
if: contains(matrix.os, 'self-hosted')
9999
with:
100+
# Pin to stable Docker version to avoid compatibility issues
101+
dind-image: "docker:27-dind"
100102
# Enable all the new features
101103
cleanup-dind-on-start: "true"
102104
smoke-test-port-mapping: "true"

0 commit comments

Comments
 (0)