Skip to content

Commit

Permalink
client: remove dependency on github.com/docker/docker/opts
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Feb 11, 2019
1 parent db44c8c commit bdaedbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"sync/atomic"
"time"

"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/homedir"
"github.com/docker/docker/pkg/stdcopy"
"github.com/fsouza/go-dockerclient/internal/jsonmessage"
Expand Down Expand Up @@ -1025,7 +1024,7 @@ func getDockerEnv() (*dockerEnv, error) {
dockerHost := os.Getenv("DOCKER_HOST")
var err error
if dockerHost == "" {
dockerHost = opts.DefaultHost
dockerHost = defaultHost
}
dockerTLSVerify := os.Getenv("DOCKER_TLS_VERIFY") != ""
var dockerCertPath string
Expand Down
2 changes: 2 additions & 0 deletions client_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"net/http"
)

const defaultHost = "unix:///var/run/docker.sock"

// initializeNativeClient initializes the native Unix domain socket client on
// Unix-style operating systems
func (c *Client) initializeNativeClient(trFunc func() *http.Transport) {
Expand Down
5 changes: 4 additions & 1 deletion client_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import (
"github.com/Microsoft/go-winio"
)

const namedPipeConnectTimeout = 2 * time.Second
const (
defaultHost = "npipe:////./pipe/docker_engine"
namedPipeConnectTimeout = 2 * time.Second
)

type pipeDialer struct {
dialFunc func(network, addr string) (net.Conn, error)
Expand Down

0 comments on commit bdaedbd

Please sign in to comment.