Skip to content

Commit

Permalink
Support DOCKER_HOST w/o protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
miracle2k committed Mar 9, 2014
1 parent 265138c commit f437b49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/build/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ func (c *Client) setHost(defaultUnixSocket string) {
if len(pieces) == 2 {
c.proto = pieces[0]
c.addr = pieces[1]
} else if len(pieces) == 1 {
c.addr = pieces[0]
}
} else {
// if the default socket doesn't exist then
Expand Down Expand Up @@ -121,7 +123,7 @@ func (c *Client) do(method, path string, in, out interface{}) error {

// make the request
conn := httputil.NewClientConn(dial, nil)
resp, err := conn.Do(req)
resp, err := conn.Do(req)el
defer conn.Close()
if err != nil {
return err
Expand Down

0 comments on commit f437b49

Please sign in to comment.