4

I am trying to log in to Docker Hub to be able to push my containers to my account. I am on a Mac using Homebrew. Docker and Colima are installed successfully and I am able to build and run containers just fine.

However, when I try to log in with docker login, after entering my username and password it sits for a second before returning this error message:

Error saving credentials: error storing credentials - err: exit status 1, out: `Post "http://ipc/registry/credstore-updated": dial unix /Users/<username>/Library/Containers/com.docker.docker/Data/backend.sock: connect: connection refused`
Aryan Beezadhur
  • 4,503
  • 4
  • 21
  • 42
Josh Klein
  • 305
  • 2
  • 8

2 Answers2

16

The problem here is probably that you have the .docker directory pointing things to Docker Desktop. Try mv ~/.docker ~/.docker.bak and restart colima and try it. I think you'll find that's what it is.

rfay
  • 9,963
  • 1
  • 47
  • 89
1

I had the same issue, and this is how I fixed it:

  1. Stop the Colima process

  2. Swap out the old ~/.docker directory:

    mv ~/.docker ~/.docker_bak
    
  3. Restart Colima

docker login and docker image pull should work now.

Aryan Beezadhur
  • 4,503
  • 4
  • 21
  • 42