From 548ae7a69e361aad6cebb0aea000613f1c229ba7 Mon Sep 17 00:00:00 2001 From: Hardy Ferentschik Date: Thu, 20 Jul 2017 17:06:04 +0200 Subject: [PATCH] Issue #327 Creating Docker client from env settings --- docker/daemon/daemon_dest.go | 2 +- docker/daemon/daemon_src.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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") }