Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins: experimental support for new plugin management #23446

Merged
merged 3 commits into from
Jun 15, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docker plugin commandline reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah authored and Tibor Vass committed Jun 14, 2016
commit e79873c27c2b3f404db02682bb4f11b5a046602e
52 changes: 52 additions & 0 deletions docs/reference/commandline/plugin_disable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--[metadata]>
+++
title = "plugin disable"
description = "the plugin disable command description and usage"
keywords = ["plugin, disable"]
[menu.main]
parent = "smn_cli"
advisory = "experimental"
+++
<![end-metadata]-->

# plugin disable (experimental)

Usage: docker plugin disable PLUGIN

Disable a plugin

--help Print usage

Disables a plugin. The plugin must be installed before it can be disabled,
see [`docker plugin install`](plugin_install.md).


The following example shows that the `no-remove` plugin is currently installed
and active:

```bash
$ docker plugin ls
NAME TAG ACTIVE
tiborvass/no-remove latest true
```
To disable the plugin, use the following command:

```bash
$ docker plugin disable tiborvass/no-remove:latest
```

After the plugin is disabled, it appears as "inactive" in the list of plugins:

```bash
$ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest false
```

## Related information

* [plugin ls](plugin_ls.md)
* [plugin enable](plugin_enable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)
* [plugin rm](plugin_rm.md)
52 changes: 52 additions & 0 deletions docs/reference/commandline/plugin_enable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--[metadata]>
+++
title = "plugin enable"
description = "the plugin enable command description and usage"
keywords = ["plugin, enable"]
[menu.main]
parent = "smn_cli"
advisory = "experimental"
+++
<![end-metadata]-->

# plugin enable (experimental)

Usage: docker plugin enable PLUGIN

Enable a plugin

--help Print usage

Enables a plugin. The plugin must be installed before it can be enabled,
see [`docker plugin install`](plugin_install.md).


The following example shows that the `no-remove` plugin is currently installed,
but disabled ("inactive"):

```bash
$ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest false
```
To enable the plugin, use the following command:

```bash
$ docker plugin enable tiborvass/no-remove:latest
```

After the plugin is enabled, it appears as "active" in the list of plugins:

```bash
$ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest true
```

## Related information

* [plugin ls](plugin_ls.md)
* [plugin disable](plugin_disable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)
* [plugin rm](plugin_rm.md)
135 changes: 135 additions & 0 deletions docs/reference/commandline/plugin_inspect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<!--[metadata]>
+++
title = "plugin inspect"
description = "The plugin inspect command description and usage"
keywords = ["plugin, inspect"]
[menu.main]
parent = "smn_cli"
advisory = "experimental"
+++
<![end-metadata]-->

# plugin inspect (experimental)

Usage: docker plugin inspect PLUGIN

Return low-level information about a plugin

--help Print usage


Returns information about a plugin. By default, this command renders all results
in a JSON array.

Example output:

```bash
$ docker plugin inspect tiborvass/no-remove:latest
```
```JSON
{
"Manifest": {
"ManifestVersion": "",
"Description": "A test plugin for Docker",
"Documentation": "https://docs.docker.com/engine/extend/plugins/",
"Entrypoint": [
"plugin-no-remove",
"/data"
],
"Interface": {
"Types": [
"docker.volumedriver/1.0"
],
"Socket": "plugins.sock"
},
"Network": {
"Type": "host"
},
"Capabilities": null,
"Mounts": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should reconcile this with moby/swarmkit#918 and #22373

{
"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
}
]
},
"Config": {
"Mounts": [
{
"Source": "/data",
"Destination": "/data",
"Type": "bind",
"Options": [
"shared",
"rbind"
]
},
{
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Env": [],
"Args": [],
"Devices": null
},
"Active": true,
"Name": "tiborvass/no-remove",
"Tag": "latest",
"ID": "ac9d36b664921d61813254f7e9946f10e3cadbb676346539f1705fcaf039c01f"
}
```
(output formatted for readability)



## Related information

* [plugin ls](plugin_ls.md)
* [plugin enable](plugin_enable.md)
* [plugin disable](plugin_disable.md)
* [plugin install](plugin_install.md)
* [plugin rm](plugin_rm.md)
51 changes: 51 additions & 0 deletions docs/reference/commandline/plugin_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!--[metadata]>
+++
title = "plugin install"
description = "the plugin install command description and usage"
keywords = ["plugin, install"]
[menu.main]
parent = "smn_cli"
advisory = "experimental"
+++
<![end-metadata]-->

# plugin install (experimental)

Usage: docker plugin install PLUGIN

Install a plugin

--help Print usage

Installs and enables a plugin. Docker looks first for the plugin on your Docker
host. If the plugin does not exist locally, then the plugin is pulled from
Docker Hub.


The following example installs `no-remove` plugin. Install consists of pulling the
plugin from Docker Hub, prompting the user to accept the list of privileges that
the plugin needs and enabling the plugin.

```bash
$ docker plugin install tiborvass/no-remove
Plugin "tiborvass/no-remove:latest" requested the following privileges:
- Networking: host
- Mounting host path: /data
Do you grant the above permissions? [y/N] y
```

After the plugin is installed, it appears in the list of plugins:

```bash
$ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest true
```

## Related information

* [plugin ls](plugin_ls.md)
* [plugin enable](plugin_enable.md)
* [plugin disable](plugin_disable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin rm](plugin_rm.md)
40 changes: 40 additions & 0 deletions docs/reference/commandline/plugin_ls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--[metadata]>
+++
title = "plugin ls"
description = "The plugin ls command description and usage"
keywords = ["plugin, list"]
[menu.main]
parent = "smn_cli"
advisory = "experimental"
+++
<![end-metadata]-->

# plugin ls (experimental)

Usage: docker plugin ls

List plugins

--help Print usage

Aliases:
ls, list

Lists all the plugins that are currently installed. You can install plugins
using the [`docker plugin install`](plugin_install.md) command.

Example output:

```bash
$ docker plugin ls
NAME VERSION ACTIVE
tiborvass/no-remove latest true
```

## Related information

* [plugin enable](plugin_enable.md)
* [plugin disable](plugin_disable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)
* [plugin rm](plugin_rm.md)
41 changes: 41 additions & 0 deletions docs/reference/commandline/plugin_rm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--[metadata]>
+++
title = "plugin rm"
description = "the plugin rm command description and usage"
keywords = ["plugin, rm"]
[menu.main]
parent = "smn_cli"
advisory = "experimental"
+++
<![end-metadata]-->

# plugin rm (experimental)

Usage: docker plugin rm PLUGIN

Remove a plugin

--help Print usage

Aliases:
rm, remove

Removes a plugin. You cannot remove a plugin if it is active, you must disable
a plugin using the [`docker plugin disable`](plugin_disable.md) before removing
it.

The following example disables and removes the `no-remove:latest` plugin;

```bash
$ docker plugin disable tiborvass/no-remove:latest
$ docker plugin rm tiborvass/no-remove:latest
no-remove:latest
```

## Related information

* [plugin ls](plugin_ls.md)
* [plugin enable](plugin_enable.md)
* [plugin disable](plugin_disable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)