5.5 KiB
| description | keywords |
|---|---|
| How to develop and use a plugin with the managed plugin system | API, Usage, plugins, documentation, developer |
Plugin Config Version 1 of Plugin V2
This document outlines the format of the V0 plugin configuration.
Plugin configs describe the various constituents of a docker plugin. Plugin configs can be serialized to JSON format with the following media types:
| Config Type | Media Type |
|---|---|
| config | "application/vnd.docker.plugin.v1+json" |
Config Field Descriptions
Config provides the base accessible fields for working with V0 plugin format in the registry.
-
descriptionstringdescription of the plugin
-
documentationstringlink to the documentation about the plugin
-
interfacePluginInterfaceinterface implemented by the plugins, struct consisting of the following fields
-
typesstring arraytypes indicate what interface(s) the plugin currently implements.
currently supported:
-
docker.volumedriver/1.0
-
docker.networkdriver/1.0
-
docker.ipamdriver/1.0
-
docker.authz/1.0
-
docker.logdriver/1.0
-
docker.metricscollector/1.0
-
-
socketstringsocket is the name of the socket the engine should use to communicate with the plugins. the socket will be created in
/run/docker/plugins.
-
-
entrypointstring arrayentrypoint of the plugin, see
ENTRYPOINT -
workdirstringworkdir of the plugin, see
WORKDIR -
networkPluginNetworknetwork of the plugin, struct consisting of the following fields
-
typestringnetwork type.
currently supported:
- bridge - host - none
-
-
mountsPluginMount arraymount of the plugin, struct consisting of the following fields, see
MOUNTS-
namestringname of the mount.
-
descriptionstringdescription of the mount.
-
sourcestringsource of the mount.
-
destinationstringdestination of the mount.
-
typestringmount type.
-
optionsstring arrayoptions of the mount.
-
-
ipchostboolean Access to host ipc namespace. -
pidhostboolean Access to host pid namespace. -
propagatedMountstringpath to be mounted as rshared, so that mounts under that path are visible to docker. This is useful for volume plugins. This path will be bind-mounted outside of the plugin rootfs so it's contents are preserved on upgrade.
-
envPluginEnv arrayenv of the plugin, struct consisting of the following fields
-
namestringname of the env.
-
descriptionstringdescription of the env.
-
valuestringvalue of the env.
-
-
argsPluginArgsargs of the plugin, struct consisting of the following fields
-
namestringname of the args.
-
descriptionstringdescription of the args.
-
valuestring arrayvalues of the args.
-
-
linuxPluginLinux-
capabilitiesstring arraycapabilities of the plugin (Linux only), see list
here -
allowAllDevicesbooleanIf
/devis bind mounted from the host, and allowAllDevices is set to true, the plugin will haverwmaccess to all devices on the host. -
devicesPluginDevice arraydevice of the plugin, (Linux only), struct consisting of the following fields, see
DEVICES-
namestringname of the device.
-
descriptionstringdescription of the device.
-
pathstringpath of the device.
-
-
Example Config
Example showing the 'tiborvass/sample-volume-plugin' plugin config.
{
"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,
"AllowAllDevices": false,
"Devices": null
},
"Mounts": null,
"Network": {
"Type": ""
},
"PropagatedMount": "/data",
"User": {},
"Workdir": ""
}