diff --git a/docker/daemon/daemon_dest.go b/docker/daemon/daemon_dest.go index 559e5c71df..9146f052d7 100644 --- a/docker/daemon/daemon_dest.go +++ b/docker/daemon/daemon_dest.go @@ -33,7 +33,7 @@ func newImageDestination(systemCtx *types.SystemContext, ref daemonReference) (t return nil, errors.Errorf("Invalid destination docker-daemon:%s: a destination must be a name:tag", ref.StringWithinTransport()) } - c, err := client.NewClient(client.DefaultDockerHost, "1.22", nil, nil) // FIXME: overridable host + c, err := client.NewEnvClient() if err != nil { return nil, errors.Wrap(err, "Error initializing docker engine client") } diff --git a/docker/daemon/daemon_src.go b/docker/daemon/daemon_src.go index 644dbeecde..8d119dec4c 100644 --- a/docker/daemon/daemon_src.go +++ b/docker/daemon/daemon_src.go @@ -35,7 +35,7 @@ type layerInfo struct { // is the config, and that the following len(RootFS) files are the layers, but that feels // way too brittle.) func newImageSource(ctx *types.SystemContext, ref daemonReference) (types.ImageSource, error) { - c, err := client.NewClient(client.DefaultDockerHost, "1.22", nil, nil) // FIXME: overridable host + c, err := client.NewEnvClient() if err != nil { return nil, errors.Wrap(err, "Error initializing docker engine client") }