Skip to content

Commit

Permalink
Use port 2376 for SSL daemon configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Sep 18, 2017
1 parent d1cae34 commit 05135dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docker/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ type FactoryApi interface {
}

func NewClient(instance *types.Instance, proxyHost string) (*client.Client, error) {
host := router.EncodeHost(instance.SessionId, instance.RoutableIP, router.HostOpts{EncodedPort: 2375})
var host string
var durl string

var tlsConfig *tls.Config
if (len(instance.Cert) > 0 && len(instance.Key) > 0) || instance.Tls {
host = router.EncodeHost(instance.SessionId, instance.RoutableIP, router.HostOpts{EncodedPort: 2376})
tlsConfig = tlsconfig.ClientDefault()
tlsConfig.InsecureSkipVerify = true
tlsConfig.ServerName = host
Expand All @@ -36,6 +37,8 @@ func NewClient(instance *types.Instance, proxyHost string) (*client.Client, erro
}
tlsConfig.Certificates = []tls.Certificate{tlsCert}
}
} else {
host = router.EncodeHost(instance.SessionId, instance.RoutableIP, router.HostOpts{EncodedPort: 2376})
}

transport := &http.Transport{
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/dind/ee/daemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"debug": true,
"log-level": "info",
"insecure-registries": ["127.0.0.1"],
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"],
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2376"],
"tls": true,
"tlscert": "/var/run/pwd/certs/cert.pem",
"tlskey": "/var/run/pwd/certs/key.pem"
Expand Down

0 comments on commit 05135dd

Please sign in to comment.