Docker error network is unreachable

Hello, I have been having a problem for the last couple of weeks that I cannot resolve. I wanted to add containers to my raspi, but got this error when pulling images.

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable.
See 'docker run --help'.

I have looked at other forum posts, but I have found nothing that fixes it. mind that I am new to docker and still don’t know a lot about it.
any help would be appreciated

What happens if you run the command curl -iL https://registry-1.docker.io/v2 on your host?

i get this back

curl: (6) Could not resolve host: registry-1.docker.io

If your host has DNS problems, then nothing that requires DNS name resolution will work. The same holds true for docker login, docker pull, docker push.

You need to fix the reachability problem (no internet access? blocked by firewall? no route?) to the dns server.

Also: are you really running Docker Desktop for Linux on a Rasperry Pi?

ok I have looked around a bit more, and noticed that my mcvlan works and containers work, and there is a conflict that doesn’t allow the actual raspberry pi on the internet. will try to clear the conflict.

also yes, I am not running docker desktop on my raspberry pi, but I couldn’t find a better tag that contained both linux and docker.

I moved your topic to the “General Discussions/General” category.

I have tried moving everything to my mcvlan network, in case there was some sort of conflict, but that didn’t fix anything. my containers still work perfectly, it is just the actual pi that has problems

That’s what it looked like from the get go. That’s why I asked you to run the curl command in the terminal. You must have some sort of routing/firewall issue.

When you say that you moved everything to you macvlan network, do you mean a vlan for your baremetal machines and/or vms, or are you referring to containers only?

I am referring to the containers only. Is there something that you suggest I should try?

Not really. The problem on your host is unrelated to macvlan - or even whether docker is installed at all.

You could try to use tracepath/traceroute to see what route your packages actually take.

ok, I will do further research on my problem, and try to solve it. thanks for the help

I was trying ti install nginx proxy manager on my homelab and got the same error search brought me here and I ran the command. Got thei back as an error

HTTP/1.1 301 Moved Permanently
content-type: text/html; charset=utf-8
docker-distribution-api-version: registry/2.0
location: /v2/
date: Fri, 29 Sep 2023 18:31:38 GMT
content-length: 39
strict-transport-security: max-age=31536000

HTTP/1.1 401 Unauthorized
content-type: application/json
docker-distribution-api-version: registry/2.0
www-authenticate: Bearer realm="https://auth.docker.io/token",service="registry.docker.io"
date: Fri, 29 Sep 2023 18:31:38 GMT
content-length: 87
strict-transport-security: max-age=31536000

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

I have a similar issue, but in my case I’m getting a failure when I try to update stickers images in my Unraid home server.

When I try updating the docker image through the community apps UI, I got this error:

Error: Get "https://registry-1.docker.io/v2/binhex/arch-prowlarr/manifests/sha256:9f90fada74de259bd23ea3224fda01289e299385c7bb81d4550ffc61b4792d4f": dial tcp [2600:1f18:2148:bc01:20a3:9c3e:d4a7:9fb]:443: connect: network is unreachable

Which led me to this thread.

I ran curl -iL https://registry-1.docker.io/v2 from my server command line, and this is what I get:

I already tried contacting my internet provider since I switched to a new one recently and I haven’t had such issues before, but they say they’re not blocking any such adress.

The output of your curl command does not indicate that anything is blocked. The output shows responses from the backend.

I have no idea what the community apps UI is, how it works and what it does. Can’t really help you with it.