From e1d7ffe5227c47d8495c4a8bd2cf652333ea5b6b Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Fri, 13 Mar 2026 18:22:32 +0100 Subject: [PATCH] fix: enable Docker API version negotiation Without WithAPIVersionNegotiation(), the Docker client defaults to the API version compiled into the moby/moby library (currently v1.53). When connecting to older Docker daemons that only support up to e.g. v1.43, this causes "client version 1.53 is too new" errors. Adding WithAPIVersionNegotiation() makes the client ping the daemon first and downgrade to the daemon's supported API version, matching the behavior of the Docker CLI itself. Signed-off-by: Jarek Krochmalski Signed-off-by: Alex Goodman --- internal/docker/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/docker/client.go b/internal/docker/client.go index 15e2dffc..5f4402d7 100644 --- a/internal/docker/client.go +++ b/internal/docker/client.go @@ -17,6 +17,7 @@ import ( func GetClient() (*client.Client, error) { var clientOpts = []client.Opt{ client.FromEnv, + client.WithAPIVersionNegotiation(), } host := os.Getenv("DOCKER_HOST")