LinuxCommandLibrary

docker-context

TLDR

List contexts

$ docker context ls
copy
Show current context
$ docker context show
copy
Create a new context
$ docker context create [name] --docker "host=ssh://[user@host]"
copy
Switch to context
$ docker context use [name]
copy
Remove a context
$ docker context rm [name]
copy
Inspect context details
$ docker context inspect [name]
copy

SYNOPSIS

docker context command [options]

DESCRIPTION

docker context manages Docker contexts, which store connection information for Docker engines. Contexts allow switching between different Docker hosts (local, remote, or cloud).

SUBCOMMANDS

ls

List contexts.
show
Print current context.
create
Create a new context.
use
Set current context.
rm
Remove contexts.
inspect
Display detailed information.
update
Update a context.
export
Export a context.
import
Import a context.

SEE ALSO

Copied to clipboard