From: Daniel Swarbrick <dswarbrick@debian.org>
Date: Mon, 5 Aug 2024 12:29:37 +0200
Subject: Support docker v25

Forwarded: not-needed

Docker v25.0 and later deprecated various constants in api/types and
moved them to api/types/container.
---
 discovery/moby/docker.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/discovery/moby/docker.go b/discovery/moby/docker.go
index 162833e..fcf8698 100644
--- a/discovery/moby/docker.go
+++ b/discovery/moby/docker.go
@@ -22,7 +22,7 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/docker/docker/api/types"
+	"github.com/docker/docker/api/types/container"
 	"github.com/docker/docker/api/types/filters"
 	"github.com/docker/docker/client"
 	"github.com/go-kit/log"
@@ -178,7 +178,7 @@ func (d *DockerDiscovery) refresh(ctx context.Context) ([]*targetgroup.Group, er
 		Source: "Docker",
 	}
 
-	containers, err := d.client.ContainerList(ctx, types.ContainerListOptions{Filters: d.filters})
+	containers, err := d.client.ContainerList(ctx, container.ListOptions{Filters: d.filters})
 	if err != nil {
 		return nil, fmt.Errorf("error while listing containers: %w", err)
 	}
