Build failing with docker-credential-desktop executable file not found in $PATH
I was using docker-desktop and now planning to migrate to colima.
- Installed lima and colima using brew
- Uninstall docker-desktop app using appcleaner
- Installed docker using
brew install docker
now when I try to build a dockerfile it throws following error
➜ docker build -t test .
[+] Building 2.1s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 125B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/node:latest 2.0s
------
> [internal] load metadata for docker.io/library/node:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: ``
Is docker-desktop required to use colima?
I referred https://github.com/docker/buildx/issues/415 and rm ~/.docker/config.json did the trick.
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: /Users/tom/.docker/config.json ───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ { 2 │ "credsStore": "desktop" 3 │ } ───────┴─────────────────────────────────────────────────────────────────```
You can delete that line and it should work fine.
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: /Users/tom/.docker/config.json ───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ { 2 │ "credsStore": "desktop" 3 │ } ───────┴─────────────────────────────────────────────────────────────────```You can delete that line and it should work fine.
yes, thanks alot it worked for me as well. 👍🏻
✅ This is working for me
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: /Users/tom/.docker/config.json ───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ { 2 │ "credsStore": "desktop" 3 │ } ───────┴─────────────────────────────────────────────────────────────────```You can delete that line and it should work fine.
yes, thanks alot it worked for me as well. 👍🏻
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: /Users/tom/.docker/config.json ───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ { 2 │ "credsStore": "desktop" 3 │ } ───────┴─────────────────────────────────────────────────────────────────```You can delete that line and it should work fine.
THIS! Thank you
rm ~/.docker/config.json. --> It worked for me.
I'm receiving this error now:
failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: ``
Removing config.json or removing the "credsStore": "desktop" line don't seem to work. After restarting Docker the file comes back.
Docker Desktop: 4.38.0 (181591) Engine: 27.5.1 Compose: v2.32.4-desktop.1 Credential Helper: v0.8.2 Kubernetes: v1.31.4
MacOS 15.1.1
Maybe you should install https://github.com/docker/docker-credential-helpers
Commands (macOS):
brew install docker-credential-helper