github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/plugin_ls.md (about)

     1  # plugin ls
     2  
     3  <!---MARKER_GEN_START-->
     4  List plugins
     5  
     6  ### Aliases
     7  
     8  `docker plugin ls`, `docker plugin list`
     9  
    10  ### Options
    11  
    12  | Name                                   | Type     | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                          |
    13  |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    14  | [`-f`](#filter), [`--filter`](#filter) | `filter` |         | Provide filter values (e.g. `enabled=true`)                                                                                                                                                                                                                                                                                                                                                                                          |
    15  | [`--format`](#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 |
    16  | `--no-trunc`                           |          |         | Don't truncate output                                                                                                                                                                                                                                                                                                                                                                                                                |
    17  | `-q`, `--quiet`                        |          |         | Only display plugin IDs                                                                                                                                                                                                                                                                                                                                                                                                              |
    18  
    19  
    20  <!---MARKER_GEN_END-->
    21  
    22  ## Description
    23  
    24  Lists all the plugins that are currently installed. You can install plugins
    25  using the [`docker plugin install`](plugin_install.md) command.
    26  You can also filter using the `-f` or `--filter` flag.
    27  Refer to the [filtering](#filter) section for more information about available filter options.
    28  
    29  ## Examples
    30  
    31  ```console
    32  $ docker plugin ls
    33  
    34  ID            NAME                                    DESCRIPTION                ENABLED
    35  69553ca1d123  tiborvass/sample-volume-plugin:latest   A test plugin for Docker   true
    36  ```
    37  
    38  ### <a name="filter"></a> Filtering (--filter)
    39  
    40  The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
    41  than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`).
    42  
    43  The currently supported filters are:
    44  
    45  * enabled (boolean - true or false, 0 or 1)
    46  * capability (string - currently `volumedriver`, `networkdriver`, `ipamdriver`, `logdriver`, `metricscollector`, or `authz`)
    47  
    48  #### enabled
    49  
    50  The `enabled` filter matches on plugins enabled or disabled.
    51  
    52  #### capability
    53  
    54  The `capability` filter matches on plugin capabilities. One plugin
    55  might have multiple capabilities. Currently `volumedriver`, `networkdriver`,
    56  `ipamdriver`, `logdriver`, `metricscollector`, and `authz` are supported capabilities.
    57  
    58  ```console
    59  $ docker plugin install --disable vieux/sshfs
    60  
    61  Installed plugin vieux/sshfs
    62  
    63  $ docker plugin ls --filter enabled=true
    64  
    65  ID                  NAME                DESCRIPTION         ENABLED
    66  ```
    67  
    68  ### <a name="format"></a> Format the output (--format)
    69  
    70  The formatting options (`--format`) pretty-prints plugins output
    71  using a Go template.
    72  
    73  Valid placeholders for the Go template are listed below:
    74  
    75  | Placeholder        | Description                                     |
    76  |--------------------|-------------------------------------------------|
    77  | `.ID`              | Plugin ID                                       |
    78  | `.Name`            | Plugin name and tag                             |
    79  | `.Description`     | Plugin description                              |
    80  | `.Enabled`         | Whether plugin is enabled or not                |
    81  | `.PluginReference` | The reference used to push/pull from a registry |
    82  
    83  When using the `--format` option, the `plugin ls` command will either
    84  output the data exactly as the template declares or, when using the
    85  `table` directive, includes column headers as well.
    86  
    87  The following example uses a template without headers and outputs the
    88  `ID` and `Name` entries separated by a colon (`:`) for all plugins:
    89  
    90  ```console
    91  $ docker plugin ls --format "{{.ID}}: {{.Name}}"
    92  
    93  4be01827a72e: vieux/sshfs:latest
    94  ```
    95  
    96  To list all plugins in JSON format, use the `json` directive:
    97  ```console
    98  $ docker plugin ls --format json
    99  {"Description":"sshFS plugin for Docker","Enabled":false,"ID":"856d89febb1c","Name":"vieux/sshfs:latest","PluginReference":"docker.io/vieux/sshfs:latest"}
   100  ```
   101  
   102  ## Related commands
   103  
   104  * [plugin create](plugin_create.md)
   105  * [plugin disable](plugin_disable.md)
   106  * [plugin enable](plugin_enable.md)
   107  * [plugin inspect](plugin_inspect.md)
   108  * [plugin install](plugin_install.md)
   109  * [plugin push](plugin_push.md)
   110  * [plugin rm](plugin_rm.md)
   111  * [plugin set](plugin_set.md)
   112  * [plugin upgrade](plugin_upgrade.md)