mirror of https://github.com/docker/cli.git
Merge pull request #863 from WTFKr0/tls-env-var
Add DOCKER_TLS environment variable for --tls option
This commit is contained in:
commit
b5df4f69db
|
@ -26,6 +26,7 @@ const (
|
||||||
var (
|
var (
|
||||||
dockerCertPath = os.Getenv("DOCKER_CERT_PATH")
|
dockerCertPath = os.Getenv("DOCKER_CERT_PATH")
|
||||||
dockerTLSVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
|
dockerTLSVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
|
||||||
|
dockerTLS = os.Getenv("DOCKER_TLS") != ""
|
||||||
)
|
)
|
||||||
|
|
||||||
// CommonOptions are options common to both the client and the daemon.
|
// CommonOptions are options common to both the client and the daemon.
|
||||||
|
@ -52,7 +53,7 @@ func (commonOpts *CommonOptions) InstallFlags(flags *pflag.FlagSet) {
|
||||||
|
|
||||||
flags.BoolVarP(&commonOpts.Debug, "debug", "D", false, "Enable debug mode")
|
flags.BoolVarP(&commonOpts.Debug, "debug", "D", false, "Enable debug mode")
|
||||||
flags.StringVarP(&commonOpts.LogLevel, "log-level", "l", "info", `Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")`)
|
flags.StringVarP(&commonOpts.LogLevel, "log-level", "l", "info", `Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")`)
|
||||||
flags.BoolVar(&commonOpts.TLS, "tls", false, "Use TLS; implied by --tlsverify")
|
flags.BoolVar(&commonOpts.TLS, "tls", dockerTLS, "Use TLS; implied by --tlsverify")
|
||||||
flags.BoolVar(&commonOpts.TLSVerify, FlagTLSVerify, dockerTLSVerify, "Use TLS and verify the remote")
|
flags.BoolVar(&commonOpts.TLSVerify, FlagTLSVerify, dockerTLSVerify, "Use TLS and verify the remote")
|
||||||
flags.StringVar(&commonOpts.Orchestrator, "orchestrator", "", "Which orchestrator to use with the docker cli (swarm|kubernetes) (default swarm) (experimental)")
|
flags.StringVar(&commonOpts.Orchestrator, "orchestrator", "", "Which orchestrator to use with the docker cli (swarm|kubernetes) (default swarm) (experimental)")
|
||||||
flags.SetAnnotation("orchestrator", "experimentalCLI", nil)
|
flags.SetAnnotation("orchestrator", "experimentalCLI", nil)
|
||||||
|
|
|
@ -66,6 +66,7 @@ by the `docker` command line:
|
||||||
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is
|
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is
|
||||||
unsuitable for Docker.
|
unsuitable for Docker.
|
||||||
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
|
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
|
||||||
|
* `DOCKER_TLS` When set Docker uses TLS.
|
||||||
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
|
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
|
||||||
* `DOCKER_CONTENT_TRUST` When set Docker uses notary to sign and verify images.
|
* `DOCKER_CONTENT_TRUST` When set Docker uses notary to sign and verify images.
|
||||||
Equates to `--disable-content-trust=false` for build, create, pull, push, run.
|
Equates to `--disable-content-trust=false` for build, create, pull, push, run.
|
||||||
|
|
Loading…
Reference in New Issue