diff --git a/go.mod b/go.mod index 09d57b17..3feb5c32 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/chroma/v2 v2.5.0 github.com/billgraziano/dpapi v0.4.0 github.com/docker/distribution v2.8.2+incompatible - github.com/docker/docker v20.10.24+incompatible + github.com/docker/docker v24.0.6+incompatible github.com/docker/go-connections v0.4.0 github.com/golang-sql/sqlexp v0.1.0 github.com/google/uuid v1.3.0 diff --git a/go.sum b/go.sum index 049de85d..a928ffd6 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,8 @@ github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m3 github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= +github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= diff --git a/internal/container/controller.go b/internal/container/controller.go index 0eea8fea..45eead59 100644 --- a/internal/container/controller.go +++ b/internal/container/controller.go @@ -7,6 +7,11 @@ import ( "bufio" "bytes" "context" + "io" + "path/filepath" + "strconv" + "strings" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" @@ -14,10 +19,6 @@ import ( "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" specs "github.com/opencontainers/image-spec/specs-go/v1" - "io" - "path/filepath" - "strconv" - "strings" ) type Controller struct { @@ -165,7 +166,7 @@ func (c Controller) ContainerStop(id string) (err error) { panic("Must pass in non-empty id") } - err = c.cli.ContainerStop(context.Background(), id, nil) + err = c.cli.ContainerStop(context.Background(), id, container.StopOptions{}) return }