Skip to content

Commit

Permalink
Only use docker client for docker runtime
Browse files Browse the repository at this point in the history
Previously _always_ asking the docker daemon

Including for other runtimes, such as podman
  • Loading branch information
afbjorklund committed Jun 26, 2020
1 parent e8cebe0 commit a1991e5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/minikube/machine/cache_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ func LoadImages(cc *config.ClusterConfig, runner command.Runner, images []string
return errors.Wrap(err, "runtime")
}

imgClient, err := client.NewClientWithOpts(client.FromEnv) // image client
if err != nil {
glog.Infof("couldn't get a local image daemon which might be ok: %v", err)
imgClient = nil
var imgClient *client.Client
if cr.Name() == "Docker" {
imgClient, err = client.NewClientWithOpts(client.FromEnv) // image client
if err != nil {
glog.Infof("couldn't get a local image daemon which might be ok: %v", err)
}
}

for _, image := range images {
Expand Down

0 comments on commit a1991e5

Please sign in to comment.