Skip to content

Commit c8d7ca0

Browse files
authored
Fix DinD Action failure (#36813)
1 parent ae2d3b8 commit c8d7ca0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ inputs:
4343
storage-driver:
4444
default: overlay2
4545
additional-dockerd-args:
46-
default: ""
46+
default: "--tls=false"
4747
use-host-network:
4848
description: "Run DinD with --network host instead of publishing a TCP port."
4949
default: "false"
@@ -206,20 +206,20 @@ runs:
206206
run: |
207207
set -euo pipefail
208208
NAME="${{ inputs.container-name || 'dind-daemon' }}"
209-
209+
210210
# Use host daemon to inspect the DinD container
211211
nm=$(docker inspect -f '{{.HostConfig.NetworkMode}}' "$NAME")
212212
echo "DinD NetworkMode=${nm}"
213213
214214
# Try to find the bridge network IP
215215
ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$NAME" || true)
216-
216+
217217
# If still empty, likely host networking -> use loopback
218218
if [[ -z "${ip}" || "${nm}" == "host" ]]; then
219219
echo "No bridge IP found or using host network. Falling back to 127.0.0.1."
220220
ip="127.0.0.1"
221221
fi
222-
222+
223223
echo "Discovered DinD IP: ${ip}"
224224
echo "dind-ip=${ip}" >> "$GITHUB_OUTPUT"
225225
@@ -237,7 +237,7 @@ runs:
237237
hostport=$(docker port redis-smoke 6379/tcp | sed 's/.*://')
238238
echo "Redis container started, mapped to host port ${hostport}"
239239
echo "Probing connection to ${DIND_IP}:${hostport} ..."
240-
240+
241241
timeout 5 bash -c 'exec 3<>/dev/tcp/$DIND_IP/'"$hostport"
242242
if [[ $? -eq 0 ]]; then
243243
echo "TCP connection successful. Port mapping is working."
@@ -272,4 +272,4 @@ runs:
272272
shell: bash
273273
run: |
274274
echo "DOCKER_HOST=${{ steps.set-output.outputs.docker-host }}" >> "$GITHUB_ENV"
275-
echo "DIND_IP=${{ steps.discover-ip.outputs.dind-ip }}" >> "$GITHUB_ENV"
275+
echo "DIND_IP=${{ steps.discover-ip.outputs.dind-ip }}" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)