Browse code

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>
(cherry picked from commit 9d532b5e2d4e68888e38ad2793d9075815e230f7)
Signed-off-by: Tibor Vass <tibor@docker.com>

Sebastiaan van Stijn authored on 2016/07/21 06:37:55
Showing 6 changed files
... ...
@@ -24,26 +24,31 @@ Disables a plugin. The plugin must be installed before it can be disabled,
24 24
 see [`docker plugin install`](plugin_install.md).
25 25
 
26 26
 
27
-The following example shows that the `no-remove` plugin is currently installed
27
+The following example shows that the `no-remove` plugin is installed
28 28
 and active:
29 29
 
30 30
 ```bash
31 31
 $ docker plugin ls
32
-NAME        	            TAG			ACTIVE
33
-tiborvass/no-remove	    latest		true
32
+
33
+NAME                        TAG           ACTIVE
34
+tiborvass/no-remove         latest        true
34 35
 ```
36
+
35 37
 To disable the plugin, use the following command:
36 38
 
37 39
 ```bash
38
-$ docker plugin disable tiborvass/no-remove:latest
40
+$ docker plugin disable tiborvass/no-remove
41
+
42
+tiborvass/no-remove
39 43
 ```
40 44
 
41 45
 After the plugin is disabled, it appears as "inactive" in the list of plugins:
42 46
 
43 47
 ```bash
44 48
 $ docker plugin ls
45
-NAME			VERSION		ACTIVE
46
-tiborvass/no-remove	latest		false
49
+
50
+NAME                    VERSION           ACTIVE
51
+tiborvass/no-remove     latest            false
47 52
 ```
48 53
 
49 54
 ## Related information
... ...
@@ -24,26 +24,31 @@ Enables a plugin. The plugin must be installed before it can be enabled,
24 24
 see [`docker plugin install`](plugin_install.md).
25 25
 
26 26
 
27
-The following example shows that the `no-remove` plugin is currently installed,
27
+The following example shows that the `no-remove` plugin is installed,
28 28
 but disabled ("inactive"):
29 29
 
30 30
 ```bash
31 31
 $ docker plugin ls
32
-NAME                	VERSION             ACTIVE
33
-tiborvass/no-remove	latest              false
32
+
33
+NAME                    VERSION             ACTIVE
34
+tiborvass/no-remove     latest              false
34 35
 ```
36
+
35 37
 To enable the plugin, use the following command:
36 38
 
37 39
 ```bash
38
-$ docker plugin enable tiborvass/no-remove:latest
40
+$ docker plugin enable tiborvass/no-remove
41
+
42
+tiborvass/no-remove
39 43
 ```
40 44
 
41 45
 After the plugin is enabled, it appears as "active" in the list of plugins:
42 46
 
43 47
 ```bash
44 48
 $ docker plugin ls
45
-NAME                	VERSION             ACTIVE
46
-tiborvass/no-remove	latest              true
49
+
50
+NAME                    VERSION             ACTIVE
51
+tiborvass/no-remove     latest              true
47 52
 ```
48 53
 
49 54
 ## Related information
... ...
@@ -30,98 +30,109 @@ $ docker plugin inspect tiborvass/no-remove:latest
30 30
 ```
31 31
 ```JSON
32 32
 {
33
-    "Manifest": {
34
-        "ManifestVersion": "",
35
-        "Description": "A test plugin for Docker",
36
-        "Documentation": "https://docs.docker.com/engine/extend/plugins/",
37
-        "Entrypoint": [
38
-            "plugin-no-remove",
39
-            "/data"
40
-        ],
41
-        "Interface": {
42
-            "Types": [
43
-                "docker.volumedriver/1.0"
44
-            ],
45
-            "Socket": "plugins.sock"
46
-        },
47
-        "Network": {
48
-            "Type": "host"
49
-        },
50
-        "Capabilities": null,
51
-        "Mounts": [
52
-            {
53
-                "Name": "",
54
-                "Description": "",
55
-                "Settable": false,
56
-                "Source": "/data",
57
-                "Destination": "/data",
58
-                "Type": "bind",
59
-                "Options": [
60
-                    "shared",
61
-                    "rbind"
62
-                ]
63
-            },
64
-            {
65
-                "Name": "",
66
-                "Description": "",
67
-                "Settable": false,
68
-                "Source": null,
69
-                "Destination": "/foobar",
70
-                "Type": "tmpfs",
71
-                "Options": null
72
-            }
73
-        ],
74
-        "Devices": [
75
-            {
76
-                "Name": "device",
77
-                "Description": "a host device to mount",
78
-                "Settable": false,
79
-                "Path": null
80
-            }
81
-        ],
82
-        "Env": [
83
-            {
84
-                "Name": "DEBUG",
85
-                "Description": "If set, prints debug messages",
86
-                "Settable": false,
87
-                "Value": null
88
-            }
89
-        ],
90
-        "Args": [
91
-            {
92
-                "Name": "arg1",
93
-                "Description": "a command line argument",
94
-                "Settable": false,
95
-                "Value": null
96
-            }
33
+  "Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
34
+  "Name": "tiborvass/no-remove",
35
+  "Tag": "latest",
36
+  "Active": true,
37
+  "Config": {
38
+    "Mounts": [
39
+      {
40
+        "Name": "",
41
+        "Description": "",
42
+        "Settable": null,
43
+        "Source": "/data",
44
+        "Destination": "/data",
45
+        "Type": "bind",
46
+        "Options": [
47
+          "shared",
48
+          "rbind"
97 49
         ]
50
+      },
51
+      {
52
+        "Name": "",
53
+        "Description": "",
54
+        "Settable": null,
55
+        "Source": null,
56
+        "Destination": "/foobar",
57
+        "Type": "tmpfs",
58
+        "Options": null
59
+      }
60
+    ],
61
+    "Env": [
62
+      "DEBUG=1"
63
+    ],
64
+    "Args": null,
65
+    "Devices": null
66
+  },
67
+  "Manifest": {
68
+    "ManifestVersion": "v0",
69
+    "Description": "A test plugin for Docker",
70
+    "Documentation": "https://docs.docker.com/engine/extend/plugins/",
71
+    "Interface": {
72
+      "Types": [
73
+        "docker.volumedriver/1.0"
74
+      ],
75
+      "Socket": "plugins.sock"
98 76
     },
99
-    "Config": {
100
-        "Mounts": [
101
-            {
102
-                "Source": "/data",
103
-                "Destination": "/data",
104
-                "Type": "bind",
105
-                "Options": [
106
-                    "shared",
107
-                    "rbind"
108
-                ]
109
-            },
110
-            {
111
-                "Source": null,
112
-                "Destination": "/foobar",
113
-                "Type": "tmpfs",
114
-                "Options": null
115
-            }
116
-        ],
117
-        "Env": [],
118
-        "Args": [],
119
-        "Devices": null
77
+    "Entrypoint": [
78
+      "plugin-no-remove",
79
+      "/data"
80
+    ],
81
+    "Workdir": "",
82
+    "User": {
120 83
     },
121
-    "Active": true,
122
-    "Name": "tiborvass/no-remove",
123
-    "Tag": "latest",
124
-    "ID": "ac9d36b664921d61813254f7e9946f10e3cadbb676346539f1705fcaf039c01f"
84
+    "Network": {
85
+      "Type": "host"
86
+    },
87
+    "Capabilities": null,
88
+    "Mounts": [
89
+      {
90
+        "Name": "",
91
+        "Description": "",
92
+        "Settable": null,
93
+        "Source": "/data",
94
+        "Destination": "/data",
95
+        "Type": "bind",
96
+        "Options": [
97
+          "shared",
98
+          "rbind"
99
+        ]
100
+      },
101
+      {
102
+        "Name": "",
103
+        "Description": "",
104
+        "Settable": null,
105
+        "Source": null,
106
+        "Destination": "/foobar",
107
+        "Type": "tmpfs",
108
+        "Options": null
109
+      }
110
+    ],
111
+    "Devices": [
112
+      {
113
+        "Name": "device",
114
+        "Description": "a host device to mount",
115
+        "Settable": null,
116
+        "Path": "/dev/cpu_dma_latency"
117
+      }
118
+    ],
119
+    "Env": [
120
+      {
121
+        "Name": "DEBUG",
122
+        "Description": "If set, prints debug messages",
123
+        "Settable": null,
124
+        "Value": "1"
125
+      }
126
+    ],
127
+    "Args": {
128
+      "Name": "args",
129
+      "Description": "command line arguments",
130
+      "Settable": null,
131
+      "Value": [
132
+
133
+      ]
134
+    }
135
+  }
125 136
 }
126 137
 ```
127 138
 (output formatted for readability)
... ...
@@ -12,7 +12,7 @@ parent = "smn_cli"
12 12
 # plugin install (experimental)
13 13
 
14 14
 ```markdown
15
-Usage:  docker plugin install PLUGIN [OPTIONS]
15
+Usage:  docker plugin install [OPTIONS] PLUGIN
16 16
 
17 17
 Install a plugin
18 18
 
... ...
@@ -33,17 +33,21 @@ the plugin needs and enabling the plugin.
33 33
 
34 34
 ```bash
35 35
 $ docker plugin install tiborvass/no-remove
36
-Plugin "tiborvass/no-remove:latest" requested the following privileges:
37
- - Networking: host
38
- - Mounting host path: /data
36
+
37
+Plugin "tiborvass/no-remove" is requesting the following privileges:
38
+ - network: [host]
39
+ - mount: [/data]
40
+ - device: [/dev/cpu_dma_latency]
39 41
 Do you grant the above permissions? [y/N] y
42
+tiborvass/no-remove
40 43
 ```
41 44
 
42 45
 After the plugin is installed, it appears in the list of plugins:
43 46
 
44 47
 ```bash
45 48
 $ docker plugin ls
46
-NAME                	VERSION             ACTIVE
49
+
50
+NAME                  VERSION             ACTIVE
47 51
 tiborvass/no-remove   latest              true
48 52
 ```
49 53
 
... ...
@@ -30,8 +30,9 @@ Example output:
30 30
 
31 31
 ```bash
32 32
 $ docker plugin ls
33
-NAME                	VERSION             ACTIVE
34
-tiborvass/no-remove	latest              true
33
+
34
+NAME                  VERSION             ACTIVE
35
+tiborvass/no-remove   latest              true
35 36
 ```
36 37
 
37 38
 ## Related information
... ...
@@ -30,7 +30,9 @@ it.
30 30
 The following example disables and removes the `no-remove:latest` plugin;
31 31
 
32 32
 ```bash
33
-$ docker plugin disable tiborvass/no-remove:latest
33
+$ docker plugin disable tiborvass/no-remove
34
+no-remove:latest
35
+
34 36
 $ docker plugin rm tiborvass/no-remove:latest
35 37
 no-remove:latest
36 38
 ```