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

[docs] Update credsStore to Colima to avoid DDEV start errors #4790

Merged
merged 3 commits into from
Apr 6, 2023

Conversation

chri5tia
Copy link
Contributor

@chri5tia chri5tia commented Mar 29, 2023

The Issue

When switching from Docker Desktop and installing colima and docker via homebrew, following this documentation here, I ran into the following issue when running ddev start on my project.

', stderr='failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop), out: ``' 

DDev was still looking for a docker desktop file, despite it being fully uninstalled.

How This PR Solves The Issue

This PR updates documentation to provide a configuration tip when migrating from Docker Desktop to Colima.
The .docker/config.json should to be updated to:

{
        "auths": {},
        "credsStore": "colima",
        "currentContext": "colima"
}

Manual Testing Instructions

PR does not change code; testing should follow the steps added to documentation for installation.

Automated Testing Overview

Related Issue Link(s)

https://stackoverflow.com/questions/67642620/docker-credential-desktop-not-installed-or-not-available-in-path#comment132716686_68202428

Release/Deployment Notes

@chri5tia chri5tia requested a review from a team as a code owner March 29, 2023 23:33
@chri5tia chri5tia changed the title [DOCS] Update credStore to Colima to avoid ddev start errors [DOCS] Update credsStore to Colima to avoid ddev start errors Mar 29, 2023
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier to just delete ~/.docker. What do you think about that?

@rfay
Copy link
Member

rfay commented Mar 30, 2023

I'm glad you brought this up!

@chri5tia
Copy link
Contributor Author

chri5tia commented Mar 30, 2023

It's easier to just delete ~/.docker. What do you think about that?

I had completely uninstalled and removed docker desktop. It's possible that this directory was still on the system. Since I ran into this after installing docker with brew as part of setting it up with Colima it would be too late at that point to delete the the whole directory, wouldn't it? I assume it was a default value which wasn't set during the Colima set up process.

It's likely a matter of hindsight. I want to assume that the user would like to keep the ~/.docker directory once everything is set up and just update the variable. It feels out of scope in the documentation to explain how to uninstall docker desktop fully if this is a result of that. Where should we go from here?

@rfay
Copy link
Member

rfay commented Mar 30, 2023

Yeah, Docker Desktop doesn't remove lots of things, and ~/.docker is one of them.

I have never heard of anybody needing the contents of ~/.docker when switching away from Docker Desktop.

Note that it's not necessary to uninstall Docker Desktop to use colima, and the docker client provided with Docker Desktop works fine with colima.

So I think it would be useful to suggest removing ~/.docker/config.json if uninstalling Docker Desktop.

@mattstein mattstein changed the title [DOCS] Update credsStore to Colima to avoid ddev start errors [docs] Update credsStore to Colima to avoid DDEV start errors Mar 30, 2023
@mattstein
Copy link
Sponsor Collaborator

So I think it would be useful to suggest removing ~/.docker/config.json if uninstalling Docker Desktop.

Since we don’t know (or need to dictate) whether someone uninstalls Docker Desktop, wouldn’t it be best to recommend deleting ~/.docker/config.json if Docker Desktop’s uninstalled, or editing the file as @chri5tia suggests if it’s still around? Someone may be trying out Colima and want to switch back to Docker Desktop, or (less likely) be tangled in an edge case that might benefit from the precision of the suggested edit, right?

@rfay
Copy link
Member

rfay commented Mar 30, 2023

The suggestion in Stack Overflow isn't even correct; you can't just change to "credsStore": "colima",, there isn't a credStore AFAIK, and the name would be the name of a profile.

I would recommend 1) Removing docker.json in case of trouble or 2) Remove the credsStore line. Why don't we just update this PR to say "Remove the credsStore line".

@mattstein
Copy link
Sponsor Collaborator

I would recommend 1) Removing docker.json in case of trouble or 2) Remove the credsStore line. Why don't we just update this PR to say "Remove the credsStore line".

Sounds more specific and accurate, so great AFAIK!

@rfay
Copy link
Member

rfay commented Apr 6, 2023

Made the suggested changes.

@rfay rfay requested a review from mattstein April 6, 2023 18:11
docs/content/users/install/docker-installation.md Outdated Show resolved Hide resolved
docs/content/users/install/docker-installation.md Outdated Show resolved Hide resolved
docs/content/users/install/docker-installation.md Outdated Show resolved Hide resolved
Co-authored-by: Matt Stein <m@ttste.in>
@rfay rfay merged commit d95902c into ddev:master Apr 6, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants