github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/context_ls.md (about) 1 # context ls 2 3 <!---MARKER_GEN_START--> 4 List 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 22 Use `docker context ls` to print all contexts. The currently active context is 23 indicated with an `*`: 24 25 ```console 26 $ docker context ls 27 28 NAME DESCRIPTION DOCKER ENDPOINT ORCHESTRATOR 29 default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm 30 production tcp:///prod.corp.example.com:2376 31 staging tcp:///stage.corp.example.com:2376 32 ```