We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 979beae commit 218da13Copy full SHA for 218da13
1 file changed
dockerutil/client.go
@@ -32,7 +32,10 @@ func WithClient(ctx context.Context, client Client) context.Context {
32
func ExtractClient(ctx context.Context) (Client, error) {
33
client := ctx.Value(clientKey{})
34
if client == nil {
35
- client, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv)
+ client, err := dockerclient.NewClientWithOpts(
36
+ dockerclient.FromEnv,
37
+ dockerclient.WithAPIVersionNegotiation(), // use daemon's max API (e.g. 1.47) so we don't exceed it
38
+ )
39
if err != nil {
40
return nil, xerrors.Errorf("new env client: %w", err)
41
}
0 commit comments