docker context ls

List contexts


$ docker context ls [OPTIONS]

For example uses of this command, refer to the examples section below.


Name, shorthand Default Description
--format Format output using a custom template: ‘table’: Print output in table format with column headers (default) ‘table TEMPLATE’: Print output in table format using the given Go template ‘json’: Print in JSON format ‘TEMPLATE’: Print output using the given Go template. Refer to for more information about formatting output with templates
--quiet , -q Only show context names


Use docker context ls to print all contexts. The currently active context is indicated with an *:

$ docker context ls

NAME                DESCRIPTION                               DOCKER ENDPOINT                      ORCHESTRATOR
default *           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock          swarm
production                                                    tcp:///
staging                                                       tcp:///

Parent command

Command Description
docker context Manage contexts
Command Description
docker context create Create a context
docker context export Export a context to a tar archive FILE or a tar stream on STDOUT.
docker context import Import a context from a tar or zip file
docker context inspect Display detailed information on one or more contexts
docker context ls List contexts
docker context rm Remove one or more contexts
docker context show Print the name of the current context
docker context update Update a context
docker context use Set the current docker context