HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

docker-credential-desktop.exe not installed

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
exedesktopdockercredentialinstallednot

Problem

Moving from Docker Desktop for Windows to Docker Server / CLI for Linux to escape the license fee, I used the standard documentation for Ubuntu to install docker into my WSL2.

After frankensteining it that way, docker itself seemed to run okay, but docker-compose was broken.

user@COMPUTER:~/git/project/rest_backend$ docker-compose up --build 
Pulling postgres (gitlab-int.company.de/team/dependency_proxy/containers/postgres:latest)...
Traceback (most recent call last):
  File "bin/docker-compose", line 6, in 
  File "compose/cli/main.py", line 72, in main
  File "compose/cli/main.py", line 128, in perform_command
  File "compose/cli/main.py", line 1077, in up
  File "compose/cli/main.py", line 1073, in up
  File "compose/project.py", line 548, in up
  File "compose/service.py", line 361, in ensure_image_exists
  File "compose/service.py", line 1250, in pull
  File "compose/progress_stream.py", line 102, in get_digest_from_pull
  File "compose/service.py", line 1215, in _do_pull
  File "site-packages/docker/api/image.py", line 396, in pull
  File "site-packages/docker/auth.py", line 48, in get_config_header
  File "site-packages/docker/auth.py", line 324, in resolve_authconfig
  File "site-packages/docker/auth.py", line 235, in resolve_authconfig
  File "site-packages/docker/auth.py", line 262, in _resolve_authconfig_credstore
  File "site-packages/docker/auth.py", line 287, in _get_store_instance
  File "site-packages/docker/credentials/store.py", line 25, in __init__
docker.credentials.errors.InitializationError: docker-credential-desktop.exe not installed or not available in PATH
[323] Failed to execute script docker-compose


How to fix this error?

Solution

When you uninstall Docker Desktop for Windows, you lose all exe files - including docker-credential-desktop.exe. But you still need a credentials-store for the docker login part.

As written in the docs there are several alternatives.

I found, that pass works. The D-BUS plugin seems to be easier to configure, but apparently requires a graphical interface.

So download docker-credential-pass-vx.y.z-amd64.tar.gz from the Docker's git repo, extract it (tar xvf ), put it in your path like sudo mv docker-credential-pass /usr/local/bin/, make sure it is executable (chmod a+x docker-credential-pass) and test it with docker-credential-pass list. It requires you to have a configured instance of pass - test with pass list.

Then check the docker-config at $HOME/.docker/config.json to make sure it uses pass:

"credsStore": "pass"


That made my escape from the license-fee complete.

Code Snippets

"credsStore": "pass"

Context

StackExchange DevOps Q#15268, answer score: 2

Revisions (0)

No revisions yet.