DockerCLI/cli/command
Sebastiaan van Stijn 6ba7de3b5a
cli/command/context: "docker context show": don't validate context
The "docker context show" command is intended to show the currently configured
context. While the context that's configured may not be valid (e.g., in case
an environment variable was set to configure the context, or if the context
was removed from the filesystem), we should still be able to _show_ the
context.

This patch removes the context validation, and instead only shows the context.
This can help in cases where the context is used to (e.g.) set the command-
prompt, but the user removed the context. With this change, the context name
can still be shown, but commands that _require_ the context will still fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-28 11:30:35 +01:00
..
builder Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
checkpoint format code with gofumpt 2022-09-30 11:59:11 +02:00
commands remove exec, push, pull, ps, images, info from "legacy" commands 2022-04-08 16:55:39 +02:00
completion Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
config format code with gofumpt 2022-09-30 11:59:11 +02:00
container format code with gofumpt 2022-09-30 11:59:11 +02:00
context cli/command/context: "docker context show": don't validate context 2022-11-28 11:30:35 +01:00
formatter format code with gofumpt 2022-09-30 11:59:11 +02:00
idresolver format code with gofumpt 2022-09-30 11:59:11 +02:00
image Merge pull request #3305 from crazy-max/rm-stream 2022-11-09 11:57:38 -08:00
inspect linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
manifest format code with gofumpt 2022-09-30 11:59:11 +02:00
network format code with gofumpt 2022-09-30 11:59:11 +02:00
node format code with gofumpt 2022-09-30 11:59:11 +02:00
plugin format code with gofumpt 2022-09-30 11:59:11 +02:00
registry format code with gofumpt 2022-09-30 11:59:11 +02:00
secret format code with gofumpt 2022-09-30 11:59:11 +02:00
service format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
stack cli/command/stack: TestConfigMergeInterpolation: various fixes 2022-11-17 13:17:51 +01:00
swarm format code with gofumpt 2022-09-30 11:59:11 +02:00
system format code with gofumpt 2022-09-30 11:59:11 +02:00
task linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
testdata Dynamically register kubernetes context store endpoint type. 2019-05-20 13:28:11 +01:00
trust format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
volume format code with gofumpt 2022-09-30 11:59:11 +02:00
cli.go cli/command: DockerCli.CurrentContext: improve GoDoc 2022-11-22 14:27:44 +01:00
cli_options.go cli/command: remove WithContextEndpointType() as it's unused 2022-07-21 18:11:50 +02:00
cli_options_test.go linting: os.Setenv() can be replaced by `t.Setenv()` (tenv) 2022-09-03 21:25:37 +02:00
cli_test.go cli/command: TestInitializeFromClientHangs fix unhandled error 2022-11-22 16:44:09 +01:00
context.go cli/command: move default context description to context itself 2022-11-22 12:57:54 +01:00
context_test.go cli/command: use more descriptive const in test 2022-11-22 12:57:57 +01:00
defaultcontextstore.go cli/flags: merge CommonOptions into ClientOptions 2022-11-22 12:32:18 +01:00
defaultcontextstore_test.go cli/flags: merge CommonOptions into ClientOptions 2022-11-22 12:32:18 +01:00
events_utils.go updated vendoring 2017-09-01 19:41:06 -04:00
registry.go format code with gofumpt 2022-09-30 11:59:11 +02:00
registry_test.go registry: don't call "/info" API endpoint to get default registry 2022-03-15 16:30:42 +01:00
streams.go Extract streams helpers from command package to their own package to remove a cyclic dependency from command to internal/containerizedengine 2019-01-28 14:36:00 +01:00
trust.go Refactor content_trust cli/flags handling 2018-03-08 15:00:43 -05:00
utils.go replace pkg/system Sequential funcs with moby/sys/sequential 2022-08-29 13:27:26 +02:00
utils_test.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00