mirror of https://github.com/docker/docs.git
91 lines
3.0 KiB
YAML
91 lines
3.0 KiB
YAML
command: docker plugin ls
|
|
aliases: list
|
|
short: List plugins
|
|
long: |-
|
|
Lists all the plugins that are currently installed. You can install plugins
|
|
using the [`docker plugin install`](plugin_install.md) command.
|
|
You can also filter using the `-f` or `--filter` flag.
|
|
Refer to the [filtering](#filtering) section for more information about available filter options.
|
|
usage: docker plugin ls [OPTIONS]
|
|
pname: docker plugin
|
|
plink: docker_plugin.yaml
|
|
options:
|
|
- option: filter
|
|
shorthand: f
|
|
description: Provide filter values (e.g. 'enabled=true')
|
|
- option: format
|
|
description: Pretty-print plugins using a Go template
|
|
- option: no-trunc
|
|
default_value: "false"
|
|
description: Don't truncate output
|
|
- option: quiet
|
|
shorthand: q
|
|
default_value: "false"
|
|
description: Only display plugin IDs
|
|
examples: |-
|
|
```bash
|
|
$ docker plugin ls
|
|
|
|
ID NAME TAG DESCRIPTION ENABLED
|
|
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker true
|
|
```
|
|
|
|
### Filtering
|
|
|
|
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
|
|
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
|
|
|
|
The currently supported filters are:
|
|
|
|
* enabled (boolean - true or false, 0 or 1)
|
|
* capability (string - currently `volumedriver`, `networkdriver`, `ipamdriver`, `logdriver`, `metricscollector`, or `authz`)
|
|
|
|
#### enabled
|
|
|
|
The `enabled` filter matches on plugins enabled or disabled.
|
|
|
|
#### capability
|
|
|
|
The `capability` filter matches on plugin capabilities. One plugin
|
|
might have multiple capabilities. Currently `volumedriver`, `networkdriver`,
|
|
`ipamdriver`, `logdriver`, `metricscollector`, and `authz` are supported capabilities.
|
|
|
|
```bash
|
|
$ docker plugin install --disable tiborvass/no-remove
|
|
|
|
tiborvass/no-remove
|
|
|
|
$ docker plugin ls --filter enabled=true
|
|
|
|
NAME TAG DESCRIPTION ENABLED
|
|
```
|
|
|
|
### Formatting
|
|
|
|
The formatting options (`--format`) pretty-prints plugins output
|
|
using a Go template.
|
|
|
|
Valid placeholders for the Go template are listed below:
|
|
|
|
Placeholder | Description
|
|
---------------|------------------------------------------------------------------------------------------
|
|
`.ID` | Plugin ID
|
|
`.Name` | Plugin name
|
|
`.Description` | Plugin description
|
|
`.Enabled` | Whether plugin is enabled or not
|
|
`.PluginReference` | The reference used to push/pull from a registry
|
|
|
|
When using the `--format` option, the `plugin ls` command will either
|
|
output the data exactly as the template declares or, when using the
|
|
`table` directive, includes column headers as well.
|
|
|
|
The following example uses a template without headers and outputs the
|
|
`ID` and `Name` entries separated by a colon for all plugins:
|
|
|
|
```bash
|
|
$ docker plugin ls --format "{{.ID}}: {{.Name}}"
|
|
|
|
4be01827a72e: tiborvass/no-remove
|
|
```
|
|
|