@@ -26,9 +26,9 @@ import (
2626 "github.com/moby/moby/api/types/container"
2727 "github.com/moby/moby/api/types/mount"
2828 "github.com/moby/moby/api/types/network"
29- "github.com/moby/moby/api/types/system"
3029 dockerclient "github.com/moby/moby/client"
3130 "github.com/moby/moby/client/pkg/jsonmessage"
31+ "github.com/moby/moby/client/pkg/security"
3232 "github.com/pkg/errors"
3333)
3434
@@ -195,7 +195,7 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error {
195195 }
196196 }
197197
198- secOpts , err := system . DecodeSecurityOptions (info .SecurityOptions )
198+ secOpts , err := security . DecodeOptions (info .SecurityOptions )
199199 if err != nil {
200200 return err
201201 }
@@ -251,7 +251,7 @@ func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error {
251251}
252252
253253func (d * Driver ) copyLogs (ctx context.Context , l progress.SubLogger ) error {
254- rc , err := d .DockerAPI .ContainerLogs (ctx , d .Name , container. LogsOptions {
254+ rc , err := d .DockerAPI .ContainerLogs (ctx , d .Name , dockerclient. ContainerLogsOptions {
255255 ShowStdout : true , ShowStderr : true ,
256256 })
257257 if err != nil {
@@ -282,7 +282,7 @@ func (d *Driver) copyToContainer(ctx context.Context, files map[string][]byte) e
282282 defer srcArchive .Close ()
283283
284284 baseDir := path .Dir (confutil .DefaultBuildKitConfigDir )
285- return d .DockerAPI .CopyToContainer (ctx , d .Name , baseDir , srcArchive , container .CopyToContainerOptions {})
285+ return d .DockerAPI .CopyToContainer (ctx , d .Name , baseDir , srcArchive , dockerclient .CopyToContainerOptions {})
286286}
287287
288288func (d * Driver ) exec (ctx context.Context , cmd []string ) (string , net.Conn , error ) {
@@ -328,7 +328,7 @@ func (d *Driver) run(ctx context.Context, cmd []string, stdout, stderr io.Writer
328328}
329329
330330func (d * Driver ) start (ctx context.Context ) error {
331- return d .DockerAPI .ContainerStart (ctx , d .Name , container. StartOptions {})
331+ return d .DockerAPI .ContainerStart (ctx , d .Name , dockerclient. ContainerStartOptions {})
332332}
333333
334334func (d * Driver ) Info (ctx context.Context ) (* driver.Info , error ) {
@@ -375,7 +375,7 @@ func (d *Driver) Stop(ctx context.Context, force bool) error {
375375 return err
376376 }
377377 if info .Status == driver .Running {
378- return d .DockerAPI .ContainerStop (ctx , d .Name , container. StopOptions {})
378+ return d .DockerAPI .ContainerStop (ctx , d .Name , dockerclient. ContainerStopOptions {})
379379 }
380380 return nil
381381}
@@ -391,7 +391,7 @@ func (d *Driver) Rm(ctx context.Context, force, rmVolume, rmDaemon bool) error {
391391 return err
392392 }
393393 if rmDaemon {
394- if err := d .DockerAPI .ContainerRemove (ctx , d .Name , container. RemoveOptions {
394+ if err := d .DockerAPI .ContainerRemove (ctx , d .Name , dockerclient. ContainerRemoveOptions {
395395 RemoveVolumes : true ,
396396 Force : force ,
397397 }); err != nil {
@@ -475,7 +475,7 @@ func (d *Driver) hasGPUCapability(ctx context.Context, image string, gpus []cont
475475 if err != nil {
476476 return false
477477 }
478- if err := d .DockerAPI .ContainerStart (ctx , resp .ID , container. StartOptions {}); err != nil {
478+ if err := d .DockerAPI .ContainerStart (ctx , resp .ID , dockerclient. ContainerStartOptions {}); err != nil {
479479 return false
480480 }
481481 return true
0 commit comments