...

Text file src/github.com/docker/cli/docs/reference/commandline/context_ls.md

Documentation: github.com/docker/cli/docs/reference/commandline

     1# context ls
     2
     3<!---MARKER_GEN_START-->
     4List contexts
     5
     6### Aliases
     7
     8`docker context ls`, `docker context list`
     9
    10### Options
    11
    12| Name            | Type     | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                          |
    13|:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    14| `--format`      | `string` |         | Format output using a custom template:<br>'table':            Print output in table format with column headers (default)<br>'table TEMPLATE':   Print output in table format using the given Go template<br>'json':             Print in JSON format<br>'TEMPLATE':         Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
    15| `-q`, `--quiet` |          |         | Only show context names                                                                                                                                                                                                                                                                                                                                                                                                              |
    16
    17
    18<!---MARKER_GEN_END-->
    19
    20## Examples
    21
    22Use `docker context ls` to print all contexts. The currently active context is
    23indicated with an `*`:
    24
    25```console
    26$ docker context ls
    27
    28NAME                DESCRIPTION                               DOCKER ENDPOINT                      ORCHESTRATOR
    29default *           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock          swarm
    30production                                                    tcp:///prod.corp.example.com:2376
    31staging                                                       tcp:///stage.corp.example.com:2376
    32```

View as plain text