|
|
@ -2,7 +2,6 @@ package driver
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"io"
|
|
|
|
"io"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/docker/buildx/store"
|
|
|
|
"github.com/docker/buildx/store"
|
|
|
@ -66,15 +65,12 @@ type Driver interface {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Writer) (*client.Client, error) {
|
|
|
|
func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Writer) (*client.Client, error) {
|
|
|
|
fmt.Println("I don't like being confused")
|
|
|
|
|
|
|
|
try := 0
|
|
|
|
try := 0
|
|
|
|
for {
|
|
|
|
for {
|
|
|
|
fmt.Println("in the for...block?")
|
|
|
|
|
|
|
|
info, err := d.Info(ctx)
|
|
|
|
info, err := d.Info(ctx)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Println("I think d.Info might be doing an out of band thing")
|
|
|
|
|
|
|
|
try++
|
|
|
|
try++
|
|
|
|
if info.Status != Running {
|
|
|
|
if info.Status != Running {
|
|
|
|
if try > 2 {
|
|
|
|
if try > 2 {
|
|
|
@ -84,7 +80,6 @@ func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Write
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Println("before or after running")
|
|
|
|
|
|
|
|
c, err := d.Client(clientContext)
|
|
|
|
c, err := d.Client(clientContext)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
if errors.Cause(err) == ErrNotRunning && try <= 2 {
|
|
|
|
if errors.Cause(err) == ErrNotRunning && try <= 2 {
|
|
|
@ -92,7 +87,6 @@ func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Write
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Println("before final return")
|
|
|
|
|
|
|
|
return c, nil
|
|
|
|
return c, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|