Skip to content

Commit

Permalink
Merge pull request #8576 from afbjorklund/image-client
Browse files Browse the repository at this point in the history
cache: Only use docker client for docker runtime
  • Loading branch information
sharifelgamal authored Jul 15, 2020
2 parents c2e6384 + a1991e5 commit 1467e8f
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 1467e8f

Please sign in to comment.