16

I'm trying to create a Docker image on a Mac computer. The command fails with the following error. I'm on Docker Desktop version 2.2.05.

Cannot run program "docker-credential-desktop": error=2, No such file or directory

I've read on some forums that including "credsStore": "osxkeychain" or "credsStore": "desktop" in ~/.docker/config.json. fixes the problem but I'm not able to find this file.

Has anybody faced this issue before? Any inputs would be appreciated.

1
  • May you share how you are trying to create that docker image? What command are you exactly running? Commented Oct 21, 2020 at 2:44

2 Answers 2

27

If you are trying to use with Spring Boot - fabric8 plugin and on mac machine do the following :

In ~/.docker/config.json change credsStore to credStore

4
  • 1
    thanks this works, please provide an explanation why.
    – hzitoun
    Commented Jan 17, 2022 at 14:39
  • this worked for me
    – notacorn
    Commented Jan 23, 2022 at 6:23
  • 1
    This worked for me, although now I'll occasionally get the same error, and when I look at that file there's both credStore and credsStore, I just delete the credsStore and then it works again.
    – Alex Ertl
    Commented Dec 2, 2022 at 17:50
  • Thanks it resolved my issue and for windows also it is working. Commented Jul 22, 2023 at 6:45
1

On macOS this file is located in: /Users/YourUserName/.docker/config.json

The content of this file should look like this:

{
  "stackOrchestrator" : "swarm",
  "auths" : {
    "https://index.docker.io/v1/" : {

    }
  },
  "credsStore" : "desktop",
  "experimental" : "disabled"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.