docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 118 forks source link

Docker login and docker pull fail with: Error response from daemon: Get "https://registry-1.docker.io/v2/": unexpected EOF #6808

Open gcobr opened 1 year ago

gcobr commented 1 year ago

Expected behavior

Logging into Docker Hub or any other registry should show the following logs: what-we-should-see 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: login-failure

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:

  1. Try and log into any registry.
  2. Try and pull any image from any registry.
Marty08 commented 1 year ago

I'm facing the exact same issue.

baumac commented 1 year ago

I'm also facing this exact same issue.

onlyann commented 1 year ago

Same issue on mac book pro M1 and the only known workaround is to downgrade to Docker Desktop 4.14.1

gcobr commented 1 year ago

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.

denisw commented 1 year ago

I can confirm that the build linked by @gcobr fixes the problem. 🎉

mrleblanc101 commented 2 months ago

Same issue, started recently

Screenshot 2024-09-16 at 8 33 33 PM