Skip to content

Commit e8b4824

Browse files
authored
Merge pull request #93 from doringeman/api-version-negotiation
Enable automatic API version negotiation for the Docker client
2 parents 2bbb399 + 6789b1d commit e8b4824

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

desktop/context.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ func DockerClientForContext(cli *command.DockerCli, name string) (*clientpkg.Cli
7272
if err != nil {
7373
return nil, fmt.Errorf("unable to determine context endpoint: %w", err)
7474
}
75-
return clientpkg.NewClientWithOpts(clientpkg.FromEnv, clientpkg.WithHost(endpoint.Host))
75+
return clientpkg.NewClientWithOpts(
76+
clientpkg.FromEnv,
77+
clientpkg.WithHost(endpoint.Host),
78+
clientpkg.WithAPIVersionNegotiation(),
79+
)
7680
}
7781

7882
// ModelRunnerEngineKind encodes the kind of Docker engine associated with the

0 commit comments

Comments
 (0)