Merge pull request #1138 from seemethere/env_experimental

Add env variable option for experimental
This commit is contained in:
Sebastiaan van Stijn 2018-06-25 14:47:16 +02:00 committed by GitHub
commit 61e53fc88a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -162,7 +162,12 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions) error {
if err != nil { if err != nil {
return err return err
} }
hasExperimental, err := isEnabled(cli.configFile.Experimental) var experimentalValue string
// Environment variable always overrides configuration
if experimentalValue = os.Getenv("DOCKER_CLI_EXPERIMENTAL"); experimentalValue == "" {
experimentalValue = cli.configFile.Experimental
}
hasExperimental, err := isEnabled(experimentalValue)
if err != nil { if err != nil {
return errors.Wrap(err, "Experimental field") return errors.Wrap(err, "Experimental field")
} }

View File

@ -61,6 +61,7 @@ by the `docker` command line:
* `DOCKER_API_VERSION` The API version to use (e.g. `1.19`) * `DOCKER_API_VERSION` The API version to use (e.g. `1.19`)
* `DOCKER_CONFIG` The location of your client configuration files. * `DOCKER_CONFIG` The location of your client configuration files.
* `DOCKER_CERT_PATH` The location of your authentication keys. * `DOCKER_CERT_PATH` The location of your authentication keys.
* `DOCKER_CLI_EXPERIMENTAL` Enable experimental features for the cli (e.g. `enabled` or `disabled`)
* `DOCKER_DRIVER` The graph driver to use. * `DOCKER_DRIVER` The graph driver to use.
* `DOCKER_HOST` Daemon socket to connect to. * `DOCKER_HOST` Daemon socket to connect to.
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is * `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is