Docker on Raspbian unable to pull

As far as I know, Linux supports 3 nameservers maximum. Sometimes it can be seen in resolv.conf as a comment, but I think I saw it in containers. nd once I had network issues when I used a corporate laptop and the company already had two nameservers and I needed to add some more in containers. I don’t remember the exact case, just keep in mind that the actually usable number of nameservers can be limited.

1 Like

Signed up to say this was the solution for me. I have a Raspberry PI 5, Raspberry PI OS v12/bookworm. I am attempting to install immich using these tutorials:

I found when inspecting /etc/resolv.conf that the DNS settings there did not correspond to the DNS settings I had been playing with using the GUI network manager. One to watch out for.

Anyway, in my case my router DNS (192.168.x.x) was first in the list (followed by 8.8.8.8 and 1.1.1.1). I removed the router DNS and set 3 public IPs. Problem solved.

Note I had already set my PI to use IPv4 only in earlier troubleshooting. Not sure if that is a factor here.

Many thanks!

I have the same error:
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
I can easily pull from windows docker but on pi or debian os under proxmox, I get this error.
DNS are set to 8.8.8.8 and 1.1.1.1 in /etc/resolv.conf.
tried all different solutions and none of them worked. I suspect the issue started after rebooting my router. I also changed the firewall to off and attack protection also is off.

What does a simple

curl https://registry-1.docker.io/v2/

do?

1 Like

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
I tried everything I found from net as well as AI, but still nothing.I sent mail also to my ISP that maybe they blocked my internet (or filter it) on linux machines, but no answer yet.

That seems exceptionally unlikely. Can you try doing a ping google.com from the terminal on your Pi or Debian machine, without involving Docker?

The "errors": [{"code":"UNAUTHORIZED"}] is a good thing. It tells you that when testing it in that way, your message gets through. It’s just not formatted in a way that the server can accept. But that’s expected here.

1 Like

ping google.com works fine. I can easily download anything except docker pull or run on the pi. on my windows docker is working fine. it is really strange. is it possible that i am blocked by docker?
you mean there is nothing with my ISP?

I don’t know for certain, but I suspect it is very, very unlikely that your ISP is to blame. It’s probably something weird about the interaction between Docker and Raspbian, or possibly your router.

1 Like

I finally fixed it, thanks to Gemini 3:

sudo chattr -i /etc/resolv.conf

sudo rm -f /etc/resolv.conf

echo -e "options single-request\noptions use-vc\nnameserver 8.8.8.8\nnameserver 1.1.1.1" | sudo tee /etc/resolv.conf

sudo chattr +i /etc/resolv.conf

echo '{"mtu": 1400}' | sudo tee /etc/docker/daemon.json

sudo systemctl restart docker

docker run hello-world