|
@@ -10,7 +10,8 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
var (
|
|
var (
|
|
- dockerCertPath = os.Getenv("DOCKER_CERT_PATH")
|
|
|
|
|
|
+ dockerCertPath = os.Getenv("DOCKER_CERT_PATH")
|
|
|
|
+ dockerTlsVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
|
|
)
|
|
)
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
@@ -26,7 +27,7 @@ var (
|
|
flSocketGroup = flag.String([]string{"G", "-group"}, "docker", "Group to assign the unix socket specified by -H when running in daemon mode\nuse '' (the empty string) to disable setting of a group")
|
|
flSocketGroup = flag.String([]string{"G", "-group"}, "docker", "Group to assign the unix socket specified by -H when running in daemon mode\nuse '' (the empty string) to disable setting of a group")
|
|
flEnableCors = flag.Bool([]string{"#api-enable-cors", "-api-enable-cors"}, false, "Enable CORS headers in the remote API")
|
|
flEnableCors = flag.Bool([]string{"#api-enable-cors", "-api-enable-cors"}, false, "Enable CORS headers in the remote API")
|
|
flTls = flag.Bool([]string{"-tls"}, false, "Use TLS; implied by tls-verify flags")
|
|
flTls = flag.Bool([]string{"-tls"}, false, "Use TLS; implied by tls-verify flags")
|
|
- flTlsVerify = flag.Bool([]string{"-tlsverify"}, false, "Use TLS and verify the remote (daemon: verify client, client: verify daemon)")
|
|
|
|
|
|
+ flTlsVerify = flag.Bool([]string{"-tlsverify"}, dockerTlsVerify, "Use TLS and verify the remote (daemon: verify client, client: verify daemon)")
|
|
|
|
|
|
// these are initialized in init() below since their default values depend on dockerCertPath which isn't fully initialized until init() runs
|
|
// these are initialized in init() below since their default values depend on dockerCertPath which isn't fully initialized until init() runs
|
|
flTrustKey *string
|
|
flTrustKey *string
|