Use port 2376 for SSL daemon configuration
This commit is contained in:
@@ -21,11 +21,12 @@ type FactoryApi interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewClient(instance *types.Instance, proxyHost string) (*client.Client, error) {
|
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 durl string
|
||||||
|
|
||||||
var tlsConfig *tls.Config
|
var tlsConfig *tls.Config
|
||||||
if (len(instance.Cert) > 0 && len(instance.Key) > 0) || instance.Tls {
|
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 = tlsconfig.ClientDefault()
|
||||||
tlsConfig.InsecureSkipVerify = true
|
tlsConfig.InsecureSkipVerify = true
|
||||||
tlsConfig.ServerName = host
|
tlsConfig.ServerName = host
|
||||||
@@ -36,6 +37,8 @@ func NewClient(instance *types.Instance, proxyHost string) (*client.Client, erro
|
|||||||
}
|
}
|
||||||
tlsConfig.Certificates = []tls.Certificate{tlsCert}
|
tlsConfig.Certificates = []tls.Certificate{tlsCert}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
host = router.EncodeHost(instance.SessionId, instance.RoutableIP, router.HostOpts{EncodedPort: 2376})
|
||||||
}
|
}
|
||||||
|
|
||||||
transport := &http.Transport{
|
transport := &http.Transport{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"debug": true,
|
"debug": true,
|
||||||
"log-level": "info",
|
"log-level": "info",
|
||||||
"insecure-registries": ["127.0.0.1"],
|
"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,
|
"tls": true,
|
||||||
"tlscert": "/var/run/pwd/certs/cert.pem",
|
"tlscert": "/var/run/pwd/certs/cert.pem",
|
||||||
"tlskey": "/var/run/pwd/certs/key.pem"
|
"tlskey": "/var/run/pwd/certs/key.pem"
|
||||||
|
|||||||
Reference in New Issue
Block a user