docs: update reference docs for plugins

the output/response slightly changed in
340964db1c8f161a2ad156023eb47dcc93bf804b,
and `:latest` is no longer required for
various actions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2016-07-20 23:37:55 +02:00 committed by Tibor Vass
parent 1f0b0b007c
commit 338cf2edd8
6 changed files with 137 additions and 109 deletions

View File

@ -24,26 +24,31 @@ Disables a plugin. The plugin must be installed before it can be disabled,
see [`docker plugin install`](plugin_install.md). see [`docker plugin install`](plugin_install.md).
The following example shows that the `no-remove` plugin is currently installed The following example shows that the `no-remove` plugin is installed
and active: and active:
```bash ```bash
$ docker plugin ls $ docker plugin ls
NAME TAG ACTIVE
tiborvass/no-remove latest true NAME TAG ACTIVE
tiborvass/no-remove latest true
``` ```
To disable the plugin, use the following command: To disable the plugin, use the following command:
```bash ```bash
$ docker plugin disable tiborvass/no-remove:latest $ docker plugin disable tiborvass/no-remove
tiborvass/no-remove
``` ```
After the plugin is disabled, it appears as "inactive" in the list of plugins: After the plugin is disabled, it appears as "inactive" in the list of plugins:
```bash ```bash
$ docker plugin ls $ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest false NAME VERSION ACTIVE
tiborvass/no-remove latest false
``` ```
## Related information ## Related information

View File

@ -24,26 +24,31 @@ Enables a plugin. The plugin must be installed before it can be enabled,
see [`docker plugin install`](plugin_install.md). see [`docker plugin install`](plugin_install.md).
The following example shows that the `no-remove` plugin is currently installed, The following example shows that the `no-remove` plugin is installed,
but disabled ("inactive"): but disabled ("inactive"):
```bash ```bash
$ docker plugin ls $ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest false NAME VERSION ACTIVE
tiborvass/no-remove latest false
``` ```
To enable the plugin, use the following command: To enable the plugin, use the following command:
```bash ```bash
$ docker plugin enable tiborvass/no-remove:latest $ docker plugin enable tiborvass/no-remove
tiborvass/no-remove
``` ```
After the plugin is enabled, it appears as "active" in the list of plugins: After the plugin is enabled, it appears as "active" in the list of plugins:
```bash ```bash
$ docker plugin ls $ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest true NAME VERSION ACTIVE
tiborvass/no-remove latest true
``` ```
## Related information ## Related information

View File

@ -30,98 +30,109 @@ $ docker plugin inspect tiborvass/no-remove:latest
``` ```
```JSON ```JSON
{ {
"Manifest": { "Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
"ManifestVersion": "", "Name": "tiborvass/no-remove",
"Description": "A test plugin for Docker", "Tag": "latest",
"Documentation": "https://docs.docker.com/engine/extend/plugins/", "Active": true,
"Entrypoint": [ "Config": {
"plugin-no-remove", "Mounts": [
"/data" {
], "Name": "",
"Interface": { "Description": "",
"Types": [ "Settable": null,
"docker.volumedriver/1.0" "Source": "/data",
], "Destination": "/data",
"Socket": "plugins.sock" "Type": "bind",
}, "Options": [
"Network": { "shared",
"Type": "host" "rbind"
},
"Capabilities": null,
"Mounts": [
{
"Name": "",
"Description": "",
"Settable": false,
"Source": "/data",
"Destination": "/data",
"Type": "bind",
"Options": [
"shared",
"rbind"
]
},
{
"Name": "",
"Description": "",
"Settable": false,
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Devices": [
{
"Name": "device",
"Description": "a host device to mount",
"Settable": false,
"Path": null
}
],
"Env": [
{
"Name": "DEBUG",
"Description": "If set, prints debug messages",
"Settable": false,
"Value": null
}
],
"Args": [
{
"Name": "arg1",
"Description": "a command line argument",
"Settable": false,
"Value": null
}
] ]
},
{
"Name": "",
"Description": "",
"Settable": null,
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Env": [
"DEBUG=1"
],
"Args": null,
"Devices": null
},
"Manifest": {
"ManifestVersion": "v0",
"Description": "A test plugin for Docker",
"Documentation": "https://docs.docker.com/engine/extend/plugins/",
"Interface": {
"Types": [
"docker.volumedriver/1.0"
],
"Socket": "plugins.sock"
}, },
"Config": { "Entrypoint": [
"Mounts": [ "plugin-no-remove",
{ "/data"
"Source": "/data", ],
"Destination": "/data", "Workdir": "",
"Type": "bind", "User": {
"Options": [
"shared",
"rbind"
]
},
{
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Env": [],
"Args": [],
"Devices": null
}, },
"Active": true, "Network": {
"Name": "tiborvass/no-remove", "Type": "host"
"Tag": "latest", },
"ID": "ac9d36b664921d61813254f7e9946f10e3cadbb676346539f1705fcaf039c01f" "Capabilities": null,
"Mounts": [
{
"Name": "",
"Description": "",
"Settable": null,
"Source": "/data",
"Destination": "/data",
"Type": "bind",
"Options": [
"shared",
"rbind"
]
},
{
"Name": "",
"Description": "",
"Settable": null,
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Devices": [
{
"Name": "device",
"Description": "a host device to mount",
"Settable": null,
"Path": "/dev/cpu_dma_latency"
}
],
"Env": [
{
"Name": "DEBUG",
"Description": "If set, prints debug messages",
"Settable": null,
"Value": "1"
}
],
"Args": {
"Name": "args",
"Description": "command line arguments",
"Settable": null,
"Value": [
]
}
}
} }
``` ```
(output formatted for readability) (output formatted for readability)

View File

@ -12,7 +12,7 @@ parent = "smn_cli"
# plugin install (experimental) # plugin install (experimental)
```markdown ```markdown
Usage: docker plugin install PLUGIN [OPTIONS] Usage: docker plugin install [OPTIONS] PLUGIN
Install a plugin Install a plugin
@ -33,17 +33,21 @@ the plugin needs and enabling the plugin.
```bash ```bash
$ docker plugin install tiborvass/no-remove $ docker plugin install tiborvass/no-remove
Plugin "tiborvass/no-remove:latest" requested the following privileges:
- Networking: host Plugin "tiborvass/no-remove" is requesting the following privileges:
- Mounting host path: /data - network: [host]
- mount: [/data]
- device: [/dev/cpu_dma_latency]
Do you grant the above permissions? [y/N] y Do you grant the above permissions? [y/N] y
tiborvass/no-remove
``` ```
After the plugin is installed, it appears in the list of plugins: After the plugin is installed, it appears in the list of plugins:
```bash ```bash
$ docker plugin ls $ docker plugin ls
NAME VERSION ACTIVE
NAME VERSION ACTIVE
tiborvass/no-remove latest true tiborvass/no-remove latest true
``` ```

View File

@ -30,8 +30,9 @@ Example output:
```bash ```bash
$ docker plugin ls $ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest true NAME VERSION ACTIVE
tiborvass/no-remove latest true
``` ```
## Related information ## Related information

View File

@ -30,7 +30,9 @@ it.
The following example disables and removes the `no-remove:latest` plugin; The following example disables and removes the `no-remove:latest` plugin;
```bash ```bash
$ docker plugin disable tiborvass/no-remove:latest $ docker plugin disable tiborvass/no-remove
no-remove:latest
$ docker plugin rm tiborvass/no-remove:latest $ docker plugin rm tiborvass/no-remove:latest
no-remove:latest no-remove:latest
``` ```