Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions driver/docker-container/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ func (d *Driver) daemonPlatform(ctx context.Context) *ocispecs.Platform {
return &p
}

type nopSubLogger struct{}

func (nopSubLogger) Wrap(_ string, fn func() error) error { return fn() }
func (nopSubLogger) Log(int, []byte) {}
func (nopSubLogger) SetStatus(*client.VertexStatus) {}

func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error {
try := 1
for {
Expand Down Expand Up @@ -517,6 +523,12 @@ func (d *Driver) Dial(ctx context.Context) (net.Conn, error) {
}

func (d *Driver) Client(ctx context.Context, opts ...client.ClientOpt) (*client.Client, error) {
// Info() is Running as soon as the container process is up, which can be
// before buildkitd has bound its socket. Boot() skips Bootstrap() in that
// case and DriverHandle caches the first Client() error, so wait here too.
if err := d.wait(ctx, nopSubLogger{}); err != nil {
return nil, err
}
conn, err := d.Dial(ctx)
if err != nil {
return nil, err
Expand Down
Loading