diff --git a/go.mod b/go.mod index 95ca930..1a91b61 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ module github.com/dependabot/cli -go 1.22.1 +go 1.22.3 require ( github.com/MakeNowJust/heredoc v1.0.0 - github.com/docker/cli v25.0.4+incompatible - github.com/docker/docker v25.0.5+incompatible + github.com/docker/cli v26.1.1+incompatible + github.com/docker/docker v26.1.1+incompatible github.com/goware/prefixer v0.0.0-20160118172347-395022866408 github.com/hexops/gotextdiff v1.0.3 - github.com/moby/moby v25.0.4+incompatible + github.com/moby/moby v26.1.1+incompatible github.com/moby/sys/signal v0.7.0 github.com/spf13/cobra v1.8.0 gopkg.in/yaml.v3 v3.0.1 @@ -30,6 +30,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.17.8 // indirect github.com/kr/text v0.2.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/user v0.1.0 // indirect diff --git a/go.sum b/go.sum index 8249111..1d5a251 100644 --- a/go.sum +++ b/go.sum @@ -23,10 +23,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v25.0.4+incompatible h1:DatRkJ+nrFoYL2HZUzjM5Z5sAmcA5XGp+AW0oEw2+cA= -github.com/docker/cli v25.0.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= -github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/cli v26.1.1+incompatible h1:bE1/uE2tCa08fMv+7ikLR/RDPoCqytwrLtkIkSzxLvw= +github.com/docker/cli v26.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v26.1.1+incompatible h1:oI+4kkAgIwwb54b9OC7Xc3hSgu1RlJA/Lln/DF72djQ= +github.com/docker/docker v26.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -60,8 +60,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/moby/moby v25.0.4+incompatible h1:vea1J80wDM5x5geaZSaywFkfFxLABJIQ3mmR4ewZGbU= -github.com/moby/moby v25.0.4+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/moby v26.1.1+incompatible h1:p86pRiZUnIQZQsHwigk0tK78A38U6xigJFC05Gq8yDY= +github.com/moby/moby v26.1.1+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= diff --git a/internal/infra/open_telemetry.go b/internal/infra/open_telemetry.go index 329191a..85b9c4e 100644 --- a/internal/infra/open_telemetry.go +++ b/internal/infra/open_telemetry.go @@ -84,7 +84,7 @@ func NewCollector(ctx context.Context, cli *client.Client, net *Networks, params return nil, fmt.Errorf("failed to copy cert to container: %w", err) } - if err = cli.ContainerStart(ctx, collectorContainer.ID, types.ContainerStartOptions{}); err != nil { + if err = cli.ContainerStart(ctx, collectorContainer.ID, container.StartOptions{}); err != nil { collector.Close() return nil, fmt.Errorf("failed to start collector container: %w", err) } @@ -109,7 +109,7 @@ func (c *Collector) Close() error { timeout := 30 _ = c.cli.ContainerStop(context.Background(), c.containerID, container.StopOptions{Timeout: &timeout}) - err := c.cli.ContainerRemove(context.Background(), c.containerID, types.ContainerRemoveOptions{Force: true}) + err := c.cli.ContainerRemove(context.Background(), c.containerID, container.RemoveOptions{Force: true}) if err != nil { return fmt.Errorf("failed to remove collector container: %w", err) } diff --git a/internal/infra/proxy.go b/internal/infra/proxy.go index 2b758a9..97c90e8 100644 --- a/internal/infra/proxy.go +++ b/internal/infra/proxy.go @@ -117,7 +117,7 @@ func NewProxy(ctx context.Context, cli *client.Client, params *RunParams, nets * } } - if err = cli.ContainerStart(ctx, proxyContainer.ID, types.ContainerStartOptions{}); err != nil { + if err = cli.ContainerStart(ctx, proxyContainer.ID, container.StartOptions{}); err != nil { _ = proxy.Close() return nil, fmt.Errorf("failed to start container: %w", err) } @@ -152,7 +152,7 @@ func putProxyConfig(ctx context.Context, cli *client.Client, config *Config, id } func (p *Proxy) TailLogs(ctx context.Context, cli *client.Client) { - out, err := cli.ContainerLogs(ctx, p.containerID, types.ContainerLogsOptions{ + out, err := cli.ContainerLogs(ctx, p.containerID, container.LogsOptions{ ShowStdout: true, ShowStderr: true, Follow: true, @@ -170,7 +170,7 @@ func (p *Proxy) TailLogs(ctx context.Context, cli *client.Client) { func (p *Proxy) Close() (err error) { defer func() { - removeErr := p.cli.ContainerRemove(context.Background(), p.containerID, types.ContainerRemoveOptions{Force: true}) + removeErr := p.cli.ContainerRemove(context.Background(), p.containerID, container.RemoveOptions{Force: true}) if removeErr != nil { err = fmt.Errorf("failed to remove proxy container: %w", removeErr) } diff --git a/internal/infra/tty.go b/internal/infra/tty.go index 62b1c59..6baf2b1 100644 --- a/internal/infra/tty.go +++ b/internal/infra/tty.go @@ -2,6 +2,7 @@ package infra import ( "context" + "github.com/docker/docker/api/types/container" "log" "os" gosignal "os/signal" @@ -9,7 +10,6 @@ import ( "time" "github.com/docker/cli/cli/streams" - "github.com/docker/docker/api/types" "github.com/moby/moby/client" "github.com/moby/sys/signal" ) @@ -23,7 +23,7 @@ func resizeTtyTo(ctx context.Context, c *client.Client, id string, height, width return nil } - options := types.ResizeOptions{ + options := container.ResizeOptions{ Height: height, Width: width, } diff --git a/internal/infra/updater.go b/internal/infra/updater.go index 78c543d..d59d286 100644 --- a/internal/infra/updater.go +++ b/internal/infra/updater.go @@ -106,7 +106,7 @@ func NewUpdater(ctx context.Context, cli *client.Client, net *Networks, params * return nil, err } - if err = cli.ContainerStart(ctx, updaterContainer.ID, types.ContainerStartOptions{}); err != nil { + if err = cli.ContainerStart(ctx, updaterContainer.ID, container.StartOptions{}); err != nil { updater.Close() return nil, fmt.Errorf("failed to start updater container: %w", err) } @@ -295,7 +295,7 @@ func (u *Updater) Wait(ctx context.Context, condition container.WaitCondition) e // Close kills and deletes the container and deletes updater mount paths related to the run. func (u *Updater) Close() (err error) { defer func() { - removeErr := u.cli.ContainerRemove(context.Background(), u.containerID, types.ContainerRemoveOptions{Force: true}) + removeErr := u.cli.ContainerRemove(context.Background(), u.containerID, container.RemoveOptions{Force: true}) if removeErr != nil { err = fmt.Errorf("failed to remove proxy container: %w", removeErr) }