[resolved] Dealing with docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop)

I am trying to setup a project on an M4 MacBook Pro, but I am running into the following error, when running docker-compose build :

[+] Building 0.9s (2/2) FINISHED                                                                                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                                                                                             0.0s
 => => transferring dockerfile: 1.86kB                                                                                                                                                                           0.0s
 => ERROR [internal] load metadata for docker.io/serversideup/php:7.4-fpm-nginx                                                                                                                                  0.9s
------
 > [internal] load metadata for docker.io/serversideup/php:7.4-fpm-nginx:
------
failed to solve: serversideup/php:7.4-fpm-nginx: failed to resolve source metadata for docker.io/serversideup/php:7.4-fpm-nginx: error getting credentials - err: docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop), out: ``

I have looked at an older post on the topic, but the steps there aren’t helping.

What I have tried so far (restarting Docker Desktop in each case)::

  • removed the ~/.docker/bin/docker-credential-desktop file
    • same error
  • removing credsStore from ~/.docker/config.json
    • result: it ends up being restored with "credsStore": "desktop",
  • removing the ~/.docker/config.json`
    • result: the file gets recreated with the same config
  • removing the ~/.docker folder

At this point doing sudo find ~/-name "docker-credential-desktop" yields no docker-credential-desktop file.

Any ideas what else I could be trying?

Environment:

  • macOS 15.2, on 16" M4 MacBook Pro
  • Docker Desktop 4.38.0 (181591)

I a bit more hunting lead me to another post, which solved my issue. Basically I edited the ~/.docker/config.json file, replacing it with the following configuration:

{
	"auths": {},
	"credsStore": "osxkeychain",
	"currentContext": "desktop-linux"
}

I am not sure why the desktop value is breaking for me, but using osxkeychain did work for me.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.