Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document use of docker-credential-helpers with Docker Desktop #303

Open
gzagatti opened this issue Dec 7, 2023 · 1 comment
Open

Document use of docker-credential-helpers with Docker Desktop #303

gzagatti opened this issue Dec 7, 2023 · 1 comment

Comments

@gzagatti
Copy link

gzagatti commented Dec 7, 2023

The documentation does not discuss the use of docker-credential-helpers with Docker desktop.

If you follow the instruction from the README file you will only be able to configure credentials for the docker in the CLI which will not be picked up by Docker Desktop.

It turns out that Docker Desktop has its own set of configurations in ~/.docker/desktop/settings.json. Make sure to change the following entry in this file so Docker Desktop picks the right credential method.

{
  "credentialHelper": "docker-credential-secretservice",
}

In my case, I finally got rid of the annoying PGP dialogues in Ubuntu by switching to the OS keyring.

It would be a great idea to have this instructions documented in the README file. It took me a while to find this workaround.

Also, is this the recommended approach to integrate the credential helpers with Docker Desktop?

@FlurinArner
Copy link

I faced the same issue as #182 (docker-credential-pass not found) after installing Docker Desktop on Ubuntu 22.04, when attempting docker login $PRIVATE_REGISTRY.

Things I noticed:

  • docker-credential-pass is only installed to /opt/docker-desktop/bin/, so not in the (default) $PATH.
  • BUT docker-credential-desktop is installed correctly to various standard $PATH locations, like /usr/bin/ for example.
  • ~/.docker/desktop/settings.json has a entry with "credentialHelper": "docker-credential-pass". That's probably a reference to the binary installed to /opt/docker-desktop/bin/, so better not mess with that..

What resolved my issue:

  1. Setting ~/.docker/config.json to
{
        "credsStore": "desktop"
}
  1. Following the Signing in with Docker Desktop for Linux Guide, to generate the gpg key and initialize pass.
  2. After this, docker login $PRIVATE_REGISTRY worked like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants