Sebastiaan van Stijn
f87d7ed864
context use: don't create/update config file and directories if not needed
...
Avoid updating the config-file if nothing changed. This also prevents creating
the file and config-directory if the default is used and no config-file existed
yet.
`config.Save()` performs various steps (creating the directory, updating
or copying permissions, etc etc), which are not needed if the defaults are
used; https://github.com/docker/cli/blob/a445d97c2536f0de37469d0ea9881288d6c49cbf/cli/config/configfile/file.go#L135-L176
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-07-29 14:20:05 +02:00
Nick Santos
aa7b1b24a5
command: treat DOCKER_HOST the same if it's empty or unset
...
print appropriate warning messages on 'context list'/'context use'
Signed-off-by: Nick Santos <nick.santos@docker.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-07-29 11:04:52 +02:00
Sebastiaan van Stijn
76b47359cb
cli/command/context: remove deprecated io/ioutil and use t.TempDir()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-02-25 15:41:50 +01:00
Sebastiaan van Stijn
2c0e93063b
bump gotest.tools v3.0.1 for compatibility with Go 1.14
...
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2020-02-23 00:28:55 +01:00
Simon Ferquel
3126920af1
Add context store config options and expose context commands
...
This will allow plugins to have custom typed endpoints, as well as
create/remove/update contexts with the exact same results as the main
CLI (thinking of things like `docker ee login https://my-ucp-server
--context ucp-prod)`
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com >
2019-01-29 11:19:54 +01:00
Simon Ferquel
591385a1d0
Fast Context Switch: commands
...
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com >
2019-01-10 22:25:43 +01:00