Skip to content

Commit

Permalink
docker: enables automatic API version negotiation for the client
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Jan 31, 2024
1 parent 555f393 commit 3d2e371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type DockerClient struct {

// NewEnvClient initializes a new Docker API client based on environment variables
func NewEnvClient() (*DockerClient, error) {
dockerAPICli, err := client.NewClientWithOpts(client.FromEnv, client.WithVersion("1.12"))
dockerAPICli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
if err != nil {
return nil, errors.Wrap(err, "failed to initialize Docker API client")
}
Expand Down

0 comments on commit 3d2e371

Please sign in to comment.