diff --git a/.github/actions/dind-up-action/action.yml b/.github/actions/dind-up-action/action.yml index 54454a5ea2fa..352491fbb8e4 100644 --- a/.github/actions/dind-up-action/action.yml +++ b/.github/actions/dind-up-action/action.yml @@ -57,6 +57,9 @@ inputs: default: 10s wait-timeout: default: "180" + dind-image: + description: "DinD image. Use a fixed version tag to avoid issues." + default: "docker:27-dind" # --- NEW: Optional Setup & Verification Steps --- cleanup-dind-on-start: @@ -129,7 +132,11 @@ runs: docker volume create --name "${STORAGE_VOL}" --label "com.github.dind=1" --label "com.github.repo=${GITHUB_REPOSITORY}" >/dev/null docker volume create --name "${EXECROOT_VOL}" --label "com.github.dind=1" --label "com.github.repo=${GITHUB_REPOSITORY}" >/dev/null + + # Clean up any existing DinD containers + docker ps -a -q --filter "label=com.github.dind=1" | xargs -r docker rm -f -v 2>/dev/null || true docker rm -f -v "$NAME" 2>/dev/null || true + sleep 2 NET_ARGS="" PUBLISH_ARGS="-p ${BIND}:${PORT}:${PORT}" @@ -138,6 +145,8 @@ runs: PUBLISH_ARGS="" fi + IMAGE="${{ inputs.dind-image || 'docker:27-dind' }}" + docker run -d --privileged --name "$NAME" \ --cgroupns=host \ -e DOCKER_TLS_CERTDIR= \ @@ -152,10 +161,11 @@ runs: --health-interval=${HI} \ --health-retries=${HR} \ --health-start-period=${HSP} \ - docker:dind \ + "${IMAGE}" \ --host=tcp://0.0.0.0:${PORT} \ --host=unix:///var/run/docker.sock \ --storage-driver=${SD} \ + --iptables=false \ --exec-root=/execroot ${EXTRA} { diff --git a/.github/workflows/beam_PreCommit_Python_Coverage.yml b/.github/workflows/beam_PreCommit_Python_Coverage.yml index 7c8af0f15d98..a0e0db3bf9b0 100644 --- a/.github/workflows/beam_PreCommit_Python_Coverage.yml +++ b/.github/workflows/beam_PreCommit_Python_Coverage.yml @@ -97,6 +97,8 @@ jobs: id: dind if: contains(matrix.os, 'self-hosted') with: + # Pin to stable Docker version to avoid compatibility issues + dind-image: "docker:27-dind" # Enable all the new features cleanup-dind-on-start: "true" smoke-test-port-mapping: "true"