1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

fix(docker): use version negotiation for the Docker client EE-5797 (#9250)

This commit is contained in:
andres-portainer 2023-07-25 19:00:21 -03:00 committed by GitHub
parent 86ec058347
commit 21b00c267d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View file

@ -90,7 +90,10 @@ func (service *service) upgradeDocker(licenseKey, version, envType string) error
}
func (service *service) checkImageForDocker(ctx context.Context, image string, skipPullImage bool) error {
cli, err := client.NewClientWithOpts(client.FromEnv)
cli, err := client.NewClientWithOpts(
client.FromEnv,
client.WithAPIVersionNegotiation(),
)
if err != nil {
return errors.Wrap(err, "failed to create docker client")
}