From 5ddd3d24590281e8ce9aa644155487b9f2a11679 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Thu, 18 Apr 2019 22:28:08 -0700 Subject: [PATCH] driver: remove unused version Signed-off-by: Tonis Tiigi --- driver/docker-container/driver.go | 1 - driver/docker-container/factory.go | 7 +------ driver/docker/driver.go | 2 -- driver/docker/factory.go | 7 +------ 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/driver/docker-container/driver.go b/driver/docker-container/driver.go index 389d56a2..585de499 100644 --- a/driver/docker-container/driver.go +++ b/driver/docker-container/driver.go @@ -25,7 +25,6 @@ var buildkitImage = "moby/buildkit:master" // TODO: make this verified and confi type Driver struct { driver.InitConfig factory driver.Factory - version dockertypes.Version } func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error { diff --git a/driver/docker-container/factory.go b/driver/docker-container/factory.go index 579a8a4e..e3c9c99f 100644 --- a/driver/docker-container/factory.go +++ b/driver/docker-container/factory.go @@ -38,12 +38,7 @@ func (f *factory) New(ctx context.Context, cfg driver.InitConfig) (driver.Driver return nil, errors.Errorf("%s driver requires docker API access", f.Name()) } - v, err := cfg.DockerAPI.ServerVersion(ctx) - if err != nil { - return nil, errors.Wrapf(driver.ErrNotConnecting, err.Error()) - } - - return &Driver{factory: f, InitConfig: cfg, version: v}, nil + return &Driver{factory: f, InitConfig: cfg}, nil } func (f *factory) AllowsInstances() bool { diff --git a/driver/docker/driver.go b/driver/docker/driver.go index 1ba9e477..9f64e986 100644 --- a/driver/docker/driver.go +++ b/driver/docker/driver.go @@ -5,7 +5,6 @@ import ( "net" "time" - dockertypes "github.com/docker/docker/api/types" "github.com/moby/buildkit/client" "github.com/pkg/errors" "github.com/tonistiigi/buildx/driver" @@ -15,7 +14,6 @@ import ( type Driver struct { factory driver.Factory driver.InitConfig - version dockertypes.Version } func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error { diff --git a/driver/docker/factory.go b/driver/docker/factory.go index 8914ecae..34a028b1 100644 --- a/driver/docker/factory.go +++ b/driver/docker/factory.go @@ -45,12 +45,7 @@ func (f *factory) New(ctx context.Context, cfg driver.InitConfig) (driver.Driver return nil, errors.Errorf("docker driver requires docker API access") } - v, err := cfg.DockerAPI.ServerVersion(ctx) - if err != nil { - return nil, errors.Wrapf(driver.ErrNotConnecting, err.Error()) - } - - return &Driver{factory: f, InitConfig: cfg, version: v}, nil + return &Driver{factory: f, InitConfig: cfg}, nil } func (f *factory) AllowsInstances() bool {