Skip to content

Commit

Permalink
Update driver.go
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmitchi authored Apr 5, 2021
1 parent adc5f35 commit 50ad8e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions driver/docker-container/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"io/ioutil"
"net"
"os"
"sync"
"time"

"github.com/docker/buildx/driver"
Expand All @@ -25,6 +26,8 @@ import (
)

type Driver struct {
mu sync.Mutex

driver.InitConfig
factory driver.Factory
netMode string
Expand All @@ -42,6 +45,9 @@ func (d *Driver) Config() driver.InitConfig {

func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
return progress.Wrap("[internal] booting buildkit", l, func(sub progress.SubLogger) error {
d.mu.Lock()
defer d.mu.Unlock()

_, err := d.DockerAPI.ContainerInspect(ctx, d.Name)
if err != nil {
if dockerclient.IsErrNotFound(err) {
Expand Down

0 comments on commit 50ad8e6

Please sign in to comment.