I'm currently trying to install Docker on my old Raspberry Pi (3 Model B+) to host some personal projects. When I run docker run hello-world, I get:

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff": dial tcp [2600:1f18:2148:bc00:eff:d3ae:b836:fa07]:443: connect: network is unreachable

My Internet connection does not support IPv6 at all, which would explain why this error occurs. But how do I force docker-pull to only use IPv4?

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 2 points 1 year ago (6 children)

Unfortunately not.

 docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff": dial tcp [2600:1f18:2148:bc00:eff:d3ae:b836:fa07]:443: connect: network is unreachable

Run 'docker run --help' for more information
  • source
  • parent
  • hideshow 6 child comments
  • [–] 2 points 1 year ago (5 children)

    Well crap. Do you have no ipv6 address now in ip addr?

    Guess I gave Docker too much benefit of the doubt and assumed it should failover to v4 once v6 was disabled. Bad assumption on my part.

    Could it be a DNS problem? If you dig registry-1.docker.io +short does it return an ipv4 or v6 address?

    It looks like there have been sporadic reports of problems from people since last year.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 1 year ago (1 child)

    Try adding {"ipv6": false} to your /etc/docker/daemon.json file (create it if it doesnt exist), then restart docker with sudo systemctl restart docker - this forces docker to use IPv4 only.

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 1 point 1 year ago (2 children)

    Do you have no ipv6 address now in ip addr

    Just comparing it by eye, there's no change.

    zag@raspberrypi:~ $ man dig
    No manual entry for dig
    zag@raspberrypi:~ $ which dig
    zag@raspberrypi:~ $ sudo apt install dig
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package dig
    

    But if I ping it

    $ ping registry-1.docker.io
    PING registry-1.docker.io (107.20.112.188) 56(84) bytes of data.
    
  • source
  • parent
  • hideshow 2 child comments