github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/docs/extend/config.md (about) 1 --- 2 title: "Plugin config" 3 description: "How develop and use a plugin with the managed plugin system" 4 keywords: "API, Usage, plugins, documentation, developer" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 17 # Plugin Config Version 1 of Plugin V2 18 19 This document outlines the format of the V0 plugin configuration. The plugin 20 config described herein was introduced in the Docker daemon in the [v1.12.0 21 release](https://github.com/docker/docker/commit/f37117045c5398fd3dca8016ea8ca0cb47e7312b). 22 23 Plugin configs describe the various constituents of a docker plugin. Plugin 24 configs can be serialized to JSON format with the following media types: 25 26 Config Type | Media Type 27 ------------- | ------------- 28 config | "application/vnd.docker.plugin.v1+json" 29 30 31 ## *Config* Field Descriptions 32 33 Config provides the base accessible fields for working with V0 plugin format 34 in the registry. 35 36 - **`description`** *string* 37 38 description of the plugin 39 40 - **`documentation`** *string* 41 42 link to the documentation about the plugin 43 44 - **`interface`** *PluginInterface* 45 46 interface implemented by the plugins, struct consisting of the following fields 47 48 - **`types`** *string array* 49 50 types indicate what interface(s) the plugin currently implements. 51 52 currently supported: 53 54 - **docker.volumedriver/1.0** 55 56 - **docker.authz/1.0** 57 58 - **`socket`** *string* 59 60 socket is the name of the socket the engine should use to communicate with the plugins. 61 the socket will be created in `/run/docker/plugins`. 62 63 64 - **`entrypoint`** *string array* 65 66 entrypoint of the plugin, see [`ENTRYPOINT`](../reference/builder.md#entrypoint) 67 68 - **`workdir`** *string* 69 70 workdir of the plugin, see [`WORKDIR`](../reference/builder.md#workdir) 71 72 - **`network`** *PluginNetwork* 73 74 network of the plugin, struct consisting of the following fields 75 76 - **`type`** *string* 77 78 network type. 79 80 currently supported: 81 82 - **bridge** 83 - **host** 84 - **none** 85 86 - **`mounts`** *PluginMount array* 87 88 mount of the plugin, struct consisting of the following fields, see [`MOUNTS`](https://github.com/opencontainers/runtime-spec/blob/master/config.md#mounts) 89 90 - **`name`** *string* 91 92 name of the mount. 93 94 - **`description`** *string* 95 96 description of the mount. 97 98 - **`source`** *string* 99 100 source of the mount. 101 102 - **`destination`** *string* 103 104 destination of the mount. 105 106 - **`type`** *string* 107 108 mount type. 109 110 - **`options`** *string array* 111 112 options of the mount. 113 114 - **`propagatedMount`** *string* 115 116 path to be mounted as rshared, so that mounts under that path are visible to docker. This is useful for volume plugins. 117 118 - **`env`** *PluginEnv array* 119 120 env of the plugin, struct consisting of the following fields 121 122 - **`name`** *string* 123 124 name of the env. 125 126 - **`description`** *string* 127 128 description of the env. 129 130 - **`value`** *string* 131 132 value of the env. 133 134 - **`args`** *PluginArgs* 135 136 args of the plugin, struct consisting of the following fields 137 138 - **`name`** *string* 139 140 name of the args. 141 142 - **`description`** *string* 143 144 description of the args. 145 146 - **`value`** *string array* 147 148 values of the args. 149 150 - **`linux`** *PluginLinux* 151 152 - **`capabilities`** *string array* 153 154 capabilities of the plugin (*Linux only*), see list [`here`](https://github.com/opencontainers/runc/blob/master/libcontainer/SPEC.md#security) 155 156 - **`allowAllDevices`** *boolean* 157 158 If `/dev` is bind mounted from the host, and allowAllDevices is set to true, the plugin will have `rwm` access to all devices on the host. 159 160 - **`devices`** *PluginDevice array* 161 162 device of the plugin, (*Linux only*), struct consisting of the following fields, see [`DEVICES`](https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices) 163 164 - **`name`** *string* 165 166 name of the device. 167 168 - **`description`** *string* 169 170 description of the device. 171 172 - **`path`** *string* 173 174 path of the device. 175 176 ## Example Config 177 178 *Example showing the 'tiborvass/sample-volume-plugin' plugin config.* 179 180 ```json 181 { 182 "Args": { 183 "Description": "", 184 "Name": "", 185 "Settable": null, 186 "Value": null 187 }, 188 "Description": "A sample volume plugin for Docker", 189 "Documentation": "https://docs.docker.com/engine/extend/plugins/", 190 "Entrypoint": [ 191 "/usr/bin/sample-volume-plugin", 192 "/data" 193 ], 194 "Env": [ 195 { 196 "Description": "", 197 "Name": "DEBUG", 198 "Settable": [ 199 "value" 200 ], 201 "Value": "0" 202 } 203 ], 204 "Interface": { 205 "Socket": "plugin.sock", 206 "Types": [ 207 "docker.volumedriver/1.0" 208 ] 209 }, 210 "Linux": { 211 "Capabilities": null, 212 "AllowAllDevices": false, 213 "Devices": null 214 }, 215 "Mounts": null, 216 "Network": { 217 "Type": "" 218 }, 219 "PropagatedMount": "/data", 220 "User": {}, 221 "Workdir": "" 222 } 223 ```