mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	 a824186ac9
			
		
	
	a824186ac9
	
	
	
		
			
			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
		
			
				
	
	
		
			33 lines
		
	
	
		
			810 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			810 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // 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
 | |
| }
 |