Docker login and docker pull fail with: Error response from daemon: Get "https://registry-1.docker.io/v2/": unexpected EOF
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID: FF87E948-A66A-4D0E-B6CC-220FCC1A6B0A/20230415090344
Expected behavior
Logging into Docker Hub or any other registry should show the following logs:
The above is from a machine where the problem does not happen.
Actual behavior
Login fails with error: Error response from daemon: Get "https://registry-1.docker.io/v2/": unexpected EOF
I can see the following in the logs:

Information
Operating system details (macOS):
~ sw_vers
ProductName: macOS
ProductVersion: 13.2.1
BuildVersion: 22D68
Architecture:
~ arch
arm64
Docker version:
~ docker version
Client:
Cloud integration: v1.0.31
Version: 20.10.23
API version: 1.41
Go version: go1.18.10
Git commit: 7155243
Built: Thu Jan 19 17:35:19 2023
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server: Docker Desktop 4.17.0 (99724)
Engine:
Version: 20.10.23
API version: 1.41 (minimum version 1.12)
Go version: go1.18.10
Git commit: 6051f14
Built: Thu Jan 19 17:31:28 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Additionally, I can verify that I can log into the registry from the same machine as long as I don't use Docker itself. E.g. by sending HTTP requests directly to the registry as the following examples:
(authenticate)
➜ ~ token=$(curl -u gcobr:myPasswordHere "https://auth.docker.io/token? service=registry.docker.io&scope=repository:library/node:pull" | jq -r .token)
(list tags)
➜ ~ curl -H "Authorization: Bearer $token" -X GET https://registry-1.docker.io/v2/library/node/tags/list | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 95103 0 95103 0 0 41992 0 --:--:-- 0:00:02 --:--:-- 42062
{
"name": "library/node",
"tags": [
"0",
"0-onbuild",
"0-slim",
"0-wheezy",
"0.10",
"0.10-onbuild",
"0.10-slim",
[...]
"stretch-slim",
"wheezy"
]
}
Therefore, I can prove that there is no networking issue preventing Docker from contacting the registry. It must be an issue with Docker itself.
Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
~ /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
[2023-04-02T23:56:43.202322000Z][com.docker.diagnose][I] set path configuration to OnHost
Starting diagnostics
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0038: is the connection to Docker working?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?
No fatal errors detected.
Steps to reproduce the behavior
I cannot determine what makes it happen only on my system:
- Try and log into any registry.
- Try and pull any image from any registry.
I'm facing the exact same issue.
I'm also facing this exact same issue.
Same issue on mac book pro M1 and the only known workaround is to downgrade to Docker Desktop 4.14.1
Docker Support staff notified me today of this "test build": https://desktop-stage.docker.com/mac/main/arm64/105384/Docker.dmg
I tested it just now, and it solves the problem described above.
I can confirm that the build linked by @gcobr fixes the problem. 🎉
Same issue, started recently