After going through several different posts on here and seeing that everyone is able to login to Docker through the command line, I noticed that I am also able to do the same but ONLY when Docker Desktop for MacOS is NOT open.
When Docker Desktop for MacOS is open, attempts at logging in to docker by running
docker login -u username
fail with the following error:
Error response from daemon: Get "https://registry-1.docker.io/v2/":
net/http: request canceled while waiting for connection
(Client.Timeout exceeded while awaiting headers)
Additionally, attempts at logging in to Docker Desktop for MacOS through the desktop application always result in the “Processing login data” process to hang until the login fails and the desktop application asks me to login again.
Uninstalling and reinstalling Docker Desktop for MacOS did nothing; the issue persists. I even installed it with brew
and the issue persists.
NOTE:
This issue stems from me working on a local project and trying to run:
docker compose up --build
to which I receive a similar error as when I try to login when Docker Desktop is open:
failed to solve: node:lts-bookworm-slim:
failed to resolve source metadata for docker.io/library/node:lts-bookworm-slim:
failed to do request: Head "https://registry-1.docker.io/v2/library/node/manifests/lts-bookworm-slim":
dialing registry-1.docker.io:443 container via direct connection because has no HTTPS proxy:
connecting to registry-1.docker.io:443:
dial tcp: lookup registry-1.docker.io: no such host
The errors above make no sense because I am not behind a proxy.