Skip to content

Ongoing DNS Resolution Issues with Docker on Ubuntu 24.04 #307

@sandeepparmar1

Description

@sandeepparmar1

Description

I am experiencing persistent DNS resolution issues when attempting to pull images using Docker Engine on Ubuntu 24.04. Despite following the official troubleshooting steps, I am unable to resolve the problem.

Steps I have taken:

  • Set IPv4 DNS servers (8.8.8.8, 8.8.4.4) in /etc/docker/daemon.json as recommended in the documentation.
  • Removed the IPv6 nameserver from /etc/resolv.conf, leaving only IPv4 nameservers.
  • Restarted the Docker service after making these changes.
  • Attempted to pull images using both the default configuration and with the --dns flag specified on the command line.

Issue:

Docker continues to fail with errors indicating it is still attempting to use an IPv6 DNS server, even though only IPv4 DNS servers are configured. The error message is similar to:

Request:

Based on the official Docker documentation and troubleshooting guides, I have exhausted the recommended solutions. I would appreciate your guidance on how to resolve this issue or any additional steps I can take to ensure Docker uses only the specified IPv4 DNS servers.

Reproduce

docker pull anyImage:tag
error pulling image configuration: download failed after attempts=6: dial tcp: lookup docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com on 10.176.250.159:53: server misbehaving

i added dns on daemon.json and also edited resolv.config still not working

Expected behavior

docker pull or docker run should have pull the image from internet but ip isn't solving and it's not able to communicate outside my local env.

docker version

Client: Docker Engine - Community
 Version:           28.5.1
 API version:       1.51
 Go version:        go1.24.8
 Git commit:        e180ab8
 Built:             Wed Oct  8 12:17:26 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.5.1
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.24.8
  Git commit:       f8215cc
  Built:            Wed Oct  8 12:17:26 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.28
  GitCommit:        b98a3aace656320842a23f4a392a33f46af97866
 runc:
  Version:          1.3.0
  GitCommit:        v1.3.0-0-g4ca628d1
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:    28.5.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.29.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.40.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 28.5.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b98a3aace656320842a23f4a392a33f46af97866
 runc version: v1.3.0-0-g4ca628d1
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.14.0-33-generic
 Operating System: Ubuntu 24.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 7.447GiB
 Name: sandeep-Vivobook-ASUSLaptop-X1502ZA-X1502ZA
 ID: 8c4590f7-fe59-4224-9cb2-74fa2211c5cf
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Diagnostics ID

i'm not using docker desktop

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions