Skip to content

Commit

Permalink
feat: enable docker client api version negotiation
Browse files Browse the repository at this point in the history
Mitigates errors like 'Error response from daemon: client version 1.42 is too new.
Maximum supported API version is 1.41'
  • Loading branch information
peter-svensson committed Feb 1, 2023
1 parent 121eb45 commit fa6ee26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ func DoBuild(dir string, buildArgs Args) error {
}

var dockerClient = func() (docker.Client, error) {
return dkr.NewClientWithOpts(dkr.FromEnv)
return dkr.NewClientWithOpts(
dkr.WithTLSClientConfigFromEnv(),
dkr.WithHostFromEnv(),
dkr.WithAPIVersionNegotiation(),
dkr.WithVersionFromEnv())
}

var setupSession = provideSession
Expand Down

0 comments on commit fa6ee26

Please sign in to comment.