Files
quorum-test-network/test-docker-dns.sh
2026-02-09 21:51:48 -08:00

17 lines
561 B
Bash
Executable File

#!/bin/bash
# Test Docker DNS connectivity
echo "Testing Docker DNS connectivity..."
echo ""
# Test 1: Try to resolve registry
echo "Test 1: DNS resolution from Docker container"
docker run --rm --dns 8.8.8.8 alpine nslookup registry-1.docker.io 2>&1 | head -5 || echo "Failed"
# Test 2: Try to pull with explicit DNS
echo ""
echo "Test 2: Pulling image with explicit DNS"
docker run --rm --dns 8.8.8.8 --dns 8.8.4.4 alpine echo "DNS test container started" 2>&1 || echo "Failed"
echo ""
echo "If both tests fail, Docker Desktop DNS needs to be configured."