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

fix(updater): specify docker client version [EE-5010] (#8459)

This commit is contained in:
cmeng 2023-02-08 17:00:22 +13:00 committed by GitHub
parent e2168d21c7
commit 51b9804fab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -11,10 +11,10 @@ import (
"github.com/cbroglie/mustache"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"
"github.com/pkg/errors"
libstack "github.com/portainer/docker-compose-wrapper"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/docker"
"github.com/portainer/portainer/api/filesystem"
"github.com/portainer/portainer/api/platform"
"github.com/rs/zerolog/log"
@ -150,7 +150,7 @@ func (service *service) upgradeDocker(licenseKey, version, envType string) error
}
func (service *service) checkImage(ctx context.Context, image string, skipPullImage bool) error {
cli, err := client.NewClientWithOpts(client.FromEnv)
cli, err := docker.CreateClientFromEnv()
if err != nil {
return errors.Wrap(err, "failed to create docker client")
}