CurrentContext returns the current context name, based on flags, environment variables and the cli configuration file, in the following order of preference: 1. The "--context" command-line option. 2. The "DOCKER_CONTEXT" environment variable ([EnvOverrideContext]). 3. The current context as configu
()
| 427 | // CurrentContext does not validate if the given context exists or if it's |
| 428 | // valid; errors may occur when trying to use it. |
| 429 | func (cli *DockerCli) CurrentContext() string { |
| 430 | return cli.currentContext |
| 431 | } |
| 432 | |
| 433 | // CurrentContext returns the current context name, based on flags, |
| 434 | // environment variables and the cli configuration file. It does not |