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