Docker daemon cannot reach public docker registry that can be reached using curl

1.6k Views Asked by At

I'm trying to use docker on my raspberry pi 2B running archlinux arm, but the docker daemon cannot contact the docker registry.

docker pull hello-world results in docker daemon output:

DEBU[2020-07-02T16:47:21.391929909Z] Calling HEAD /_ping
DEBU[2020-07-02T16:47:21.394012289Z] Calling GET /v1.40/info
DEBU[2020-07-02T16:47:21.444644977Z] Calling POST /v1.40/images/create?fromImage=hello-world&tag=latest
DEBU[2020-07-02T16:47:21.445747989Z] Trying to pull hello-world from https://registry-1.docker.io v2
WARN[2020-07-02T16:47:36.446771393Z] Error getting v2 registry: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
INFO[2020-07-02T16:47:36.447023996Z] Attempting next endpoint for pull after error: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO[2020-07-02T16:47:36.447505346Z] Handler for POST /v1.40/images/create returned error: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

I can however curl that address, curl https://registry-1.docker.io/v2/ gives:

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

I can also dig it, dig registry-1.docker.io

; <<>> DiG 9.16.4 <<>> registry-1.docker.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54200
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;registry-1.docker.io.          IN      A

;; ANSWER SECTION:
registry-1.docker.io.   53      IN      A       52.5.11.128
registry-1.docker.io.   53      IN      A       35.174.73.84
registry-1.docker.io.   53      IN      A       52.72.232.213
registry-1.docker.io.   53      IN      A       52.1.121.53
registry-1.docker.io.   53      IN      A       52.54.232.21
registry-1.docker.io.   53      IN      A       52.4.20.24
registry-1.docker.io.   53      IN      A       54.236.131.166
registry-1.docker.io.   53      IN      A       54.85.107.53

;; Query time: 0 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Jul 02 16:54:59 UTC 2020
;; MSG SIZE  rcvd: 177

My daemon.json is:

{
    "dns": ["8.8.8.8", "8.8.4.4"],
    "debug": true
}

/etc/resolv.conf

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4

output of ip link:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:e1:df:6c brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:b4:8a:39 brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:2b:be:08:ee brd ff:ff:ff:ff:ff:ff
5: br-35ff30d41af9: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:01:4c:7e:30 brd ff:ff:ff:ff:ff:ff

Any ideas?

0

There are 0 best solutions below