@@ -21,6 +21,7 @@ import (
21
21
22
22
dockertypes "github.com/docker/docker/api/types"
23
23
dockercontainer "github.com/docker/docker/api/types/container"
24
+ "github.com/docker/docker/api/types/image"
24
25
dockernetwork "github.com/docker/docker/api/types/network"
25
26
"github.com/docker/docker/api/types/registry"
26
27
dockerapi "github.com/docker/docker/client"
@@ -122,20 +123,20 @@ type Docker interface {
122
123
123
124
// Client contains all methods used when interacting directly with docker engine-api
124
125
type Client interface {
125
- ContainerAttach (ctx context.Context , container string , options dockertypes. ContainerAttachOptions ) (dockertypes.HijackedResponse , error )
126
- ContainerCommit (ctx context.Context , container string , options dockertypes. ContainerCommitOptions ) (dockertypes.IDResponse , error )
126
+ ContainerAttach (ctx context.Context , container string , options dockercontainer. AttachOptions ) (dockertypes.HijackedResponse , error )
127
+ ContainerCommit (ctx context.Context , container string , options dockercontainer. CommitOptions ) (dockertypes.IDResponse , error )
127
128
ContainerCreate (ctx context.Context , config * dockercontainer.Config , hostConfig * dockercontainer.HostConfig , networkingConfig * dockernetwork.NetworkingConfig , platform * v1.Platform , containerName string ) (dockercontainer.CreateResponse , error )
128
129
ContainerInspect (ctx context.Context , container string ) (dockertypes.ContainerJSON , error )
129
- ContainerRemove (ctx context.Context , container string , options dockertypes. ContainerRemoveOptions ) error
130
- ContainerStart (ctx context.Context , container string , options dockertypes. ContainerStartOptions ) error
130
+ ContainerRemove (ctx context.Context , container string , options dockercontainer. RemoveOptions ) error
131
+ ContainerStart (ctx context.Context , container string , options dockercontainer. StartOptions ) error
131
132
ContainerKill (ctx context.Context , container , signal string ) error
132
133
ContainerWait (ctx context.Context , container string , condition dockercontainer.WaitCondition ) (<- chan dockercontainer.WaitResponse , <- chan error )
133
134
CopyToContainer (ctx context.Context , container , path string , content io.Reader , opts dockertypes.CopyToContainerOptions ) error
134
135
CopyFromContainer (ctx context.Context , container , srcPath string ) (io.ReadCloser , dockertypes.ContainerPathStat , error )
135
136
ImageBuild (ctx context.Context , buildContext io.Reader , options dockertypes.ImageBuildOptions ) (dockertypes.ImageBuildResponse , error )
136
137
ImageInspectWithRaw (ctx context.Context , image string ) (dockertypes.ImageInspect , []byte , error )
137
138
ImagePull (ctx context.Context , ref string , options dockertypes.ImagePullOptions ) (io.ReadCloser , error )
138
- ImageRemove (ctx context.Context , image string , options dockertypes.ImageRemoveOptions ) ([]dockertypes. ImageDeleteResponseItem , error )
139
+ ImageRemove (ctx context.Context , image string , options dockertypes.ImageRemoveOptions ) ([]image. DeleteResponse , error )
139
140
ServerVersion (ctx context.Context ) (dockertypes.Version , error )
140
141
}
141
142
@@ -260,8 +261,8 @@ func (rco RunContainerOptions) asDockerCreateContainerOptions() configWrapper {
260
261
261
262
// asDockerAttachToContainerOptions converts a RunContainerOptions into a
262
263
// ContainerAttachOptions understood by the docker client
263
- func (rco RunContainerOptions ) asDockerAttachToContainerOptions () dockertypes. ContainerAttachOptions {
264
- return dockertypes. ContainerAttachOptions {
264
+ func (rco RunContainerOptions ) asDockerAttachToContainerOptions () dockercontainer. AttachOptions {
265
+ return dockercontainer. AttachOptions {
265
266
Stdin : rco .Stdin != nil ,
266
267
Stdout : rco .Stdout != nil ,
267
268
Stderr : rco .Stderr != nil ,
@@ -631,7 +632,7 @@ func updateImageWithInspect(image *api.Image, inspect *dockertypes.ImageInspect)
631
632
func (d * stiDocker ) RemoveContainer (id string ) error {
632
633
ctx , cancel := getDefaultContext ()
633
634
defer cancel ()
634
- opts := dockertypes. ContainerRemoveOptions {
635
+ opts := dockercontainer. RemoveOptions {
635
636
RemoveVolumes : true ,
636
637
}
637
638
return d .client .ContainerRemove (ctx , id , opts )
@@ -1040,7 +1041,7 @@ func (d *stiDocker) RunContainer(opts RunContainerOptions) error {
1040
1041
log .V (2 ).Infof ("Starting container %q ..." , container .ID )
1041
1042
ctx , cancel = getDefaultContext ()
1042
1043
defer cancel ()
1043
- err = d .client .ContainerStart (ctx , container .ID , dockertypes. ContainerStartOptions {})
1044
+ err = d .client .ContainerStart (ctx , container .ID , dockercontainer. StartOptions {})
1044
1045
if err != nil {
1045
1046
return err
1046
1047
}
@@ -1115,7 +1116,7 @@ func (d *stiDocker) GetImageID(name string) (string, error) {
1115
1116
// CommitContainer commits a container to an image with a specific tag.
1116
1117
// The new image ID is returned
1117
1118
func (d * stiDocker ) CommitContainer (opts CommitContainerOptions ) (string , error ) {
1118
- dockerOpts := dockertypes. ContainerCommitOptions {
1119
+ dockerOpts := dockercontainer. CommitOptions {
1119
1120
Reference : opts .Repository ,
1120
1121
}
1121
1122
if opts .Command != nil || opts .Entrypoint != nil {
0 commit comments