mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
driver: remove unused version
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
96b1892b63
commit
5ddd3d2459
@ -25,7 +25,6 @@ var buildkitImage = "moby/buildkit:master" // TODO: make this verified and confi
|
|||||||
type Driver struct {
|
type Driver struct {
|
||||||
driver.InitConfig
|
driver.InitConfig
|
||||||
factory driver.Factory
|
factory driver.Factory
|
||||||
version dockertypes.Version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
||||||
|
@ -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())
|
return nil, errors.Errorf("%s driver requires docker API access", f.Name())
|
||||||
}
|
}
|
||||||
|
|
||||||
v, err := cfg.DockerAPI.ServerVersion(ctx)
|
return &Driver{factory: f, InitConfig: cfg}, nil
|
||||||
if err != nil {
|
|
||||||
return nil, errors.Wrapf(driver.ErrNotConnecting, err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
return &Driver{factory: f, InitConfig: cfg, version: v}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *factory) AllowsInstances() bool {
|
func (f *factory) AllowsInstances() bool {
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
dockertypes "github.com/docker/docker/api/types"
|
|
||||||
"github.com/moby/buildkit/client"
|
"github.com/moby/buildkit/client"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/tonistiigi/buildx/driver"
|
"github.com/tonistiigi/buildx/driver"
|
||||||
@ -15,7 +14,6 @@ import (
|
|||||||
type Driver struct {
|
type Driver struct {
|
||||||
factory driver.Factory
|
factory driver.Factory
|
||||||
driver.InitConfig
|
driver.InitConfig
|
||||||
version dockertypes.Version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
||||||
|
@ -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")
|
return nil, errors.Errorf("docker driver requires docker API access")
|
||||||
}
|
}
|
||||||
|
|
||||||
v, err := cfg.DockerAPI.ServerVersion(ctx)
|
return &Driver{factory: f, InitConfig: cfg}, nil
|
||||||
if err != nil {
|
|
||||||
return nil, errors.Wrapf(driver.ErrNotConnecting, err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
return &Driver{factory: f, InitConfig: cfg, version: v}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *factory) AllowsInstances() bool {
|
func (f *factory) AllowsInstances() bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user