hi,
I installed docker on Android and sudo docker version works fine and shows Client and Server available. but any kind of command , such as hello-world, pull, push, build, etc returns me this error.
this is my command
sudo docker build -t img1 .
ERROR: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:35711->[::1]:53: read: connection refused
i am working on Android and do not have systemd, systemctl to start restart service, i used dockerd to start daemon and it started with no error
i am not sure if there is any firewall proxy on android, how can i evaluate it?
please help me i really need it
looks like it's trying to connect to IPv6 localhost for DNS resolution.
note that Android is currently not a supported platform for Docker (at least very much untested).
Does it work if you configure the host to use (e.g.) 8.8.8.8 as primary DNS server (not sure how it's configured in your environment, on linux it would usually be done through /etc/resolv.conf
Hello again,
tried to set DNS on android, by sudo setprop dns1 8.8.8.8 and sudo setprop dns1 8.8.4.4 . and getprop also returns correctly. but still have connection refuse problem.
there is not /etc/resolv.conf on android9 !!! no idea how to solve this problem , i have limited time, please help me. thanks
I took this screen shot after setting my DNS, any Idea guys??

I'm having the same issue on openSUSE Leap 15.2, but only on the first attempt to pull an image after boot.
my /etc/resolv.conf is fine, configured by DHCP.
What happens here is the docker daemon trying to contact ::1 as nameserver, via IPv6, and totally ignores what is actually configured in /etc/resolv.conf... why?
Interesting detail:
after the first fail the issue "repairs itself" - after waiting for ...maybe a minute or so the next attempt to pull an image works. But if I try again right after the first fail, it fails again.
On the other hand, it does not matter how long the system has been up - the first pull fails, the next one fails if tried too soon afte the fail, then it works until reboot.
Someone please explain o.0
have you set
nameserver 8.8.8.8
nameserver 8.8.4.4
in your /etc/resolv.conf?
i already said that my /etc/resolv.conf is fine - everyting else and their dog is perfectly able to resolve hostnames.
You do realize that with the settings that you suggest the system will be unable to resolve hostnames for local adresses?
Anyway, I found something:
the systems here that show this problem all run NetworkManager for the network, the ones that dont have static (manually) configured network.
So .. I changed the start of the docker unit file to include "NetworkManager-wait-online.service" in the "After=" line, and nof the problem doesn't happen anymore. Seems that when dockerd is "normally" started, networkmanager isn't up yet so docker can'T find the DNS in /etc/resolv.conf, and just assumes ::1 instead. But on the second try it uses what's in resolv.conf by then, which is the properly configured dns.
Just saw this on aarch64, Debian Buster. This is a wreck.
had the same error and kept re-running the command docker-compose up db which attempts to pull the mariadb container. I didnt change a thing and the 5th try succeeded.
re-trying N times, each time it works.
Now I tried to set the nameserver 8.8.8.8
Most helpful comment
have you set
nameserver 8.8.8.8
nameserver 8.8.4.4
in your /etc/resolv.conf?