DockerCLI/cli/command/context
Sebastiaan van Stijn 2c9dff1436
cli/command/context: context ls: always show current context
if a context is set (e.g. through DOCKER_CONTEXT or the CLI config file), but
wasn't found, then a "stub" context is added, including an error message that
the context doesn't exist.

    DOCKER_CONTEXT=nosuchcontext docker context ls
    NAME              DESCRIPTION                               DOCKER ENDPOINT               ERROR
    default           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock
    nosuchcontext *                                                                           context "nosuchcontext": context not found: …

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-28 23:41:29 +01:00
..
testdata cli/command/context: context ls: always show current context 2022-11-28 23:41:29 +01:00
cmd.go introduce `context show` command 2022-04-25 14:40:24 +02:00
create.go cli/context/store: simplify error handling, and make it more idiomatic 2022-09-30 11:19:25 +02:00
create_test.go cli/command/context: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:50 +01:00
export-import_test.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
export.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
import.go Introduce .zip import for docker context 2019-05-29 12:58:45 -07:00
inspect.go introduce `context show` command 2022-04-25 14:40:24 +02:00
inspect_test.go cli/command/context: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:50 +01:00
list.go cli/command/context: context ls: always show current context 2022-11-28 23:41:29 +01:00
list_test.go cli/command/context: context ls: always show current context 2022-11-28 23:41:29 +01:00
options.go Drop support for (archived) Compose-on-Kubernetes 2022-02-22 13:47:34 +01:00
remove.go cli/context/store: simplify error handling, and make it more idiomatic 2022-09-30 11:19:25 +02:00
remove_test.go cli/context/store: simplify error handling, and make it more idiomatic 2022-09-30 11:19:25 +02:00
show.go cli/command/context: "docker context show": don't validate context 2022-11-28 11:30:35 +01:00
show_test.go cli/command/context: "docker context show": don't validate context 2022-11-28 11:30:35 +01:00
update.go use our own version of text/tabwriter 2022-04-25 15:01:41 +02:00
update_test.go cli/command/context: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:50 +01:00
use.go context use: don't create/update config file and directories if not needed 2022-07-29 14:20:05 +02:00
use_test.go cli/context/store: simplify error handling, and make it more idiomatic 2022-09-30 11:19:25 +02:00