Only use docker client for docker runtime

Previously _always_ asking the docker daemon

Including for other runtimes, such as podman
pull/8576/head
Anders F Björklund 2020-06-26 22:12:43 +02:00
parent e8cebe0330
commit a1991e596d
1 changed files with 6 additions and 4 deletions

View File

@ -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 {