Skip to content

Add instructions to resolve docker context error #19197

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

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/minikube/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ func propagateDockerContextToEnv() {
md, err := st.GetMetadata(currentContext)
if err != nil {
klog.Warningf("Unable to resolve the current Docker CLI context %q: %v", currentContext, err)
klog.Warningf("Try running `docker context use %s` to resolve the above error", currentContext)
Copy link
Member

Choose a reason for hiding this comment

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

this is not always gonna be the case !
it is true that if they set a wrong context it will not be able to resolve the docker, but it would say the error if the docker host doesnt exist...

I think it would worth it if minikube check for multiple contexts in the begining...where we Cache the docker system info we can cache how many Contexts it has and keep it for each minikube run so we if there are Multiple Context we can make a note of it in the Logs and make it a possible source of error

Copy link
Member

Choose a reason for hiding this comment

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

never mind I think I mis-thought

return
}
dockerEP, ok := md.Endpoints[ddocker.DockerEndpoint]
Expand Down
Loading