colima icon indicating copy to clipboard operation
colima copied to clipboard

Build failing with docker-credential-desktop executable file not found in $PATH

Open thamaraiselvam opened this issue 5 years ago • 9 comments

I was using docker-desktop and now planning to migrate to colima.

  1. Installed lima and colima using brew
  2. Uninstall docker-desktop app using appcleaner
  3. 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?

thamaraiselvam avatar Nov 01 '21 08:11 thamaraiselvam

I referred https://github.com/docker/buildx/issues/415 and rm ~/.docker/config.json did the trick.

thamaraiselvam avatar Nov 01 '21 08:11 thamaraiselvam

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /Users/tom/.docker/config.json
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │     "credsStore": "desktop"
   3   │ }
───────┴─────────────────────────────────────────────────────────────────```

You can delete that line and it should work fine.

abiosoft avatar Nov 01 '21 08:11 abiosoft

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ 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. 👍🏻

TheShubham-K avatar Jun 04 '23 10:06 TheShubham-K

✅ This is working for me

nyomansunima avatar Aug 08 '23 05:08 nyomansunima

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ 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. 👍🏻

nyomansunima avatar Aug 08 '23 05:08 nyomansunima

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /Users/tom/.docker/config.json
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │     "credsStore": "desktop"
   3   │ }
───────┴─────────────────────────────────────────────────────────────────```

You can delete that line and it should work fine.

THIS! Thank you

silabs-theophilel avatar Oct 28 '24 10:10 silabs-theophilel

rm ~/.docker/config.json. --> It worked for me.

CuriousGu avatar Jan 29 '25 22:01 CuriousGu

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

adrianblynch avatar Feb 05 '25 14:02 adrianblynch

Maybe you should install https://github.com/docker/docker-credential-helpers

Commands (macOS):

brew install docker-credential-helper

alswl avatar Apr 01 '25 15:04 alswl