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

Check for cri-dockerd & dockerd runtimes when using none-driver on Kubernetes 1.24+ #14555

Merged
merged 14 commits into from
Jul 28, 2022
Merged
13 changes: 11 additions & 2 deletions pkg/minikube/cruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,17 @@ func (r *Docker) SocketPath() string {

// Available returns an error if it is not possible to use this runtime on a host
func (r *Docker) Available() error {
_, err := exec.LookPath("docker")
return err
var err error
if _, err = exec.LookPath("docker"); err == nil {
klaases marked this conversation as resolved.
Show resolved Hide resolved
return nil
}
if _, err = exec.LookPath("cri-dockerd"); err == nil {
klaases marked this conversation as resolved.
Show resolved Hide resolved
return nil
}
if _, err = exec.LookPath("dockerd"); err == nil {
klaases marked this conversation as resolved.
Show resolved Hide resolved
return nil
}
return errors.New("runtimes were not found: docker, cri-dockerd, dockerd")
}

// Active returns if docker is active on the host
Expand Down