Skip to content

Commit b066ee1

Browse files
authored
Merge pull request #2961 from thaJeztah/driver_use_errdefs
driver/docker-container: remove uses of dockerclient.IsErrNotFound
2 parents cf8bf9e + 3bd54b1 commit b066ee1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

driver/docker-container/driver.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/docker/docker/api/types/mount"
2424
"github.com/docker/docker/api/types/network"
2525
"github.com/docker/docker/api/types/system"
26-
dockerclient "github.com/docker/docker/client"
2726
"github.com/docker/docker/errdefs"
2827
dockerarchive "github.com/docker/docker/pkg/archive"
2928
"github.com/docker/docker/pkg/idtools"
@@ -70,7 +69,7 @@ func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
7069
return progress.Wrap("[internal] booting buildkit", l, func(sub progress.SubLogger) error {
7170
_, err := d.DockerAPI.ContainerInspect(ctx, d.Name)
7271
if err != nil {
73-
if dockerclient.IsErrNotFound(err) {
72+
if errdefs.IsNotFound(err) {
7473
return d.create(ctx, sub)
7574
}
7675
return err
@@ -306,7 +305,7 @@ func (d *Driver) start(ctx context.Context) error {
306305
func (d *Driver) Info(ctx context.Context) (*driver.Info, error) {
307306
ctn, err := d.DockerAPI.ContainerInspect(ctx, d.Name)
308307
if err != nil {
309-
if dockerclient.IsErrNotFound(err) {
308+
if errdefs.IsNotFound(err) {
310309
return &driver.Info{
311310
Status: driver.Inactive,
312311
}, nil

0 commit comments

Comments
 (0)