Skip to content

Commit

Permalink
Merge pull request moby#29431 from vieux/update_plugin_examples
Browse files Browse the repository at this point in the history
replace no-remove by sample-volume-plugin in docs
  • Loading branch information
vieux authored Jan 4, 2017
2 parents 48ed4f0 + bcead92 commit 355f2ae
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 182 deletions.
126 changes: 28 additions & 98 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1498,74 +1498,39 @@ definitions:
type: "string"
example:
Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
Name: "tiborvass/no-remove"
Name: "tiborvass/sample-volume-plugin"
Tag: "latest"
Active: true
Config:
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
Settings:
Env:
- "DEBUG=1"
- "DEBUG=0"
Args: null
Devices: null
Manifest:
ManifestVersion: "v0"
Description: "A test plugin for Docker"
Config:
Description: "A sample volume plugin for Docker"
Documentation: "https://docs.docker.com/engine/extend/plugins/"
Interface:
Types:
- "docker.volumedriver/1.0"
Socket: "plugins.sock"
Entrypoint:
- "plugin-no-remove"
- "/usr/bin/sample-volume-plugin"
- "/data"
WorkDir: ""
User: {}
Network:
Type: "host"
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"
Type: ""
Linux:
Capabilities: null
DeviceCreation: false
Devices: null
Mounts: null
PropagatedMount: "/data"
Env:
- Name: "DEBUG"
Description: "If set, prints debug messages"
Settable: null
Value: "1"
Value: "0"
Args:
Name: "args"
Description: "command line arguments"
Expand Down Expand Up @@ -6374,74 +6339,39 @@ paths:
$ref: "#/definitions/Plugin"
example:
- Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
Name: "tiborvass/no-remove"
Name: "tiborvass/sample-volume-plugin"
Tag: "latest"
Active: true
Config:
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
Settings:
Env:
- "DEBUG=1"
- "DEBUG=0"
Args: null
Devices: null
Manifest:
ManifestVersion: "v0"
Description: "A test plugin for Docker"
Config:
Description: "A sample volume plugin for Docker"
Documentation: "https://docs.docker.com/engine/extend/plugins/"
Interface:
Types:
- "docker.volumedriver/1.0"
Socket: "plugins.sock"
Entrypoint:
- "plugin-no-remove"
- "/usr/bin/sample-volume-plugin"
- "/data"
WorkDir: ""
User: {}
Network:
Type: "host"
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"
Type: ""
Linux:
Capabilities: null
DeviceCreation: false
Devices: null
Mounts: null
PropagatedMount: "/data"
Env:
- Name: "DEBUG"
Description: "If set, prints debug messages"
Settable: null
Value: "1"
Value: "0"
Args:
Name: "args"
Description: "command line arguments"
Expand Down
85 changes: 41 additions & 44 deletions docs/extend/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,52 +171,49 @@ Config provides the base accessible fields for working with V0 plugin format

## Example Config

*Example showing the 'tiborvass/no-remove' plugin config.*
*Example showing the 'tiborvass/sample-volume-plugin' plugin config.*

```json
{
"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"
},
"mounts": [
{
"source": "/data",
"destination": "/data",
"type": "bind",
"options": ["shared", "rbind"]
},
{
"destination": "/foobar",
"type": "tmpfs"
}
],
"args": {
"name": "args",
"description": "command line arguments",
"value": []
},
"env": [
{
"name": "DEBUG",
"description": "If set, prints debug messages",
"value": "1"
}
],
"linux": {
"devices": [
{
"name": "device",
"description": "a host device to mount",
"path": "/dev/cpu_dma_latency"
}
]
}
"Args": {
"Description": "",
"Name": "",
"Settable": null,
"Value": null
},
"Description": "A sample volume plugin for Docker",
"Documentation": "https://docs.docker.com/engine/extend/plugins/",
"Entrypoint": [
"/usr/bin/sample-volume-plugin",
"/data"
],
"Env": [
{
"Description": "",
"Name": "DEBUG",
"Settable": [
"value"
],
"Value": "0"
}
],
"Interface": {
"Socket": "plugin.sock",
"Types": [
"docker.volumedriver/1.0"
]
},
"Linux": {
"Capabilities": null,
"DeviceCreation": false,
"Devices": null
},
"Mounts": null,
"Network": {
"Type": ""
},
"PropagatedMount": "/data",
"User": {},
"Workdir": ""
}
```
4 changes: 2 additions & 2 deletions docs/reference/commandline/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ relative to the current time on the client machine:
2015-12-23T21:38:25.119625123Z network connect 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, container=b4be644031a3d90b400f88ab3d4bdf4dc23adb250e696b6328b85441abe2c54e, type=bridge)

$ docker events --filter 'type=plugin' (experimental)
2016-07-25T17:30:14.825557616Z plugin pull ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/no-remove:latest)
2016-07-25T17:30:14.888127370Z plugin enable ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/no-remove:latest)
2016-07-25T17:30:14.825557616Z plugin pull ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
2016-07-25T17:30:14.888127370Z plugin enable ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)

**Format:**

Expand Down
14 changes: 7 additions & 7 deletions docs/reference/commandline/plugin_disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ see [`docker plugin install`](plugin_install.md). Without the `-f` option,
a plugin that has references (eg, volumes, networks) cannot be disabled.


The following example shows that the `no-remove` plugin is installed
The following example shows that the `sample-volume-plugin` plugin is installed
and enabled:

```bash
$ docker plugin ls

ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/no-remove latest A test plugin for Docker true
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker true
```

To disable the plugin, use the following command:

```bash
$ docker plugin disable tiborvass/no-remove
$ docker plugin disable tiborvass/sample-volume-plugin

tiborvass/no-remove
tiborvass/sample-volume-plugin

$ docker plugin ls

ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/no-remove latest A test plugin for Docker false
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker false
```

## Related information
Expand Down
14 changes: 7 additions & 7 deletions docs/reference/commandline/plugin_enable.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ 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 installed,
The following example shows that the `sample-volume-plugin` plugin is installed,
but disabled:

```bash
$ docker plugin ls

ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/no-remove latest A test plugin for Docker false
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker false
```

To enable the plugin, use the following command:

```bash
$ docker plugin enable tiborvass/no-remove
$ docker plugin enable tiborvass/sample-volume-plugin

tiborvass/no-remove
tiborvass/sample-volume-plugin

$ docker plugin ls

ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/no-remove latest A test plugin for Docker true
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker true
```

## Related information
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/commandline/plugin_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ in a JSON array.
Example output:

```bash
$ docker plugin inspect tiborvass/no-remove:latest
$ docker plugin inspect tiborvass/sample-volume-plugin:latest
```
```JSON
{
"Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
"Name": "tiborvass/no-remove:latest",
"Name": "tiborvass/sample-volume-plugin:latest",
"Enabled": true,
"Config": {
"Mounts": [
Expand Down Expand Up @@ -79,7 +79,7 @@ $ docker plugin inspect tiborvass/no-remove:latest
"Socket": "plugins.sock"
},
"Entrypoint": [
"plugin-no-remove",
"plugin-sample-volume-plugin",
"/data"
],
"Workdir": "",
Expand Down Expand Up @@ -143,7 +143,7 @@ $ docker plugin inspect tiborvass/no-remove:latest


```bash
$ docker plugin inspect -f '{{.Id}}' tiborvass/no-remove:latest
$ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest
```
```
8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21
Expand Down
Loading

0 comments on commit 355f2ae

Please sign in to comment.