summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/client_unix.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-04-25 13:26:52 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-27 20:51:07 +0000
commita824186ac9803ef5f7548df790988a4ebd2d9c07 (patch)
tree63c64e9be4d9c44bd160dd974b740231497eabcd /vendor/github.com/fsouza/go-dockerclient/client_unix.go
parent4e468ce83d69e9748e80eb98a6f5bd3c5114cc7d (diff)
downloadpodman-a824186ac9803ef5f7548df790988a4ebd2d9c07.tar.gz
podman-a824186ac9803ef5f7548df790988a4ebd2d9c07.tar.bz2
podman-a824186ac9803ef5f7548df790988a4ebd2d9c07.zip
Use buildah commit and bud in podman
Vendor in buildah and use as much of commit and bug as possible for podman build and commit. Resolves #586 Signed-off-by: baude <bbaude@redhat.com> Closes: #681 Approved by: mheon
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/client_unix.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/client_unix.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/client_unix.go b/vendor/github.com/fsouza/go-dockerclient/client_unix.go
new file mode 100644
index 000000000..57d7904ea
--- /dev/null
+++ b/vendor/github.com/fsouza/go-dockerclient/client_unix.go
@@ -0,0 +1,32 @@
+// Copyright 2016 go-dockerclient authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !windows
+
+package docker
+
+import (
+ "context"
+ "net"
+ "net/http"
+)
+
+// initializeNativeClient initializes the native Unix domain socket client on
+// Unix-style operating systems
+func (c *Client) initializeNativeClient(trFunc func() *http.Transport) {
+ if c.endpointURL.Scheme != unixProtocol {
+ return
+ }
+ sockPath := c.endpointURL.Path
+
+ tr := trFunc()
+
+ tr.Dial = func(network, addr string) (net.Conn, error) {
+ return c.Dialer.Dial(unixProtocol, sockPath)
+ }
+ tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
+ return c.Dialer.Dial(unixProtocol, sockPath)
+ }
+ c.HTTPClient.Transport = tr
+}