docker Plugin config

Plugin Config Version 1 of Plugin V2

This document outlines the format of the V0 plugin configuration. The pluginconfig described herein was introduced in the Docker daemon in thev1.12.0release.

Plugin configs describe the various constituents of a docker plugin. Pluginconfigs can be serialized to JSON format with the following media types:

Config TypeMedia 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.

  • description string

    description of the plugin

  • documentation string

    link to the documentation about the plugin
    
  • interface PluginInterface

    interface implemented by the plugins, struct consisting of the following fields

    • types string array

      types 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

    • socket string

      socket is the name of the socket the engine should use to communicate with the plugins.the socket will be created in/run/docker/plugins.

  • entrypoint string array

    entrypoint of the plugin, see ENTRYPOINT

  • workdir string

    workdir of the plugin, see WORKDIR

  • network PluginNetwork

    network of the plugin, struct consisting of the following fields

    • type string

      network type.

      currently supported:

      - **bridge**
      - **host**
      - **none**
      
  • mounts PluginMount array

    mount of the plugin, struct consisting of the following fields, see MOUNTS

    • name string

      name of the mount.

    • description string

      description of the mount.

    • source string

      source of the mount.

    • destination string

      destination of the mount.

    • type string

      mount type.

    • options string array

      options of the mount.

  • ipchost boolean Access to host ipc namespace.
  • pidhost boolean Access to host pid namespace.

  • propagatedMount string

    path 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 outisde of the plugin rootfs so it’s contents are preserved on upgrade.

  • env PluginEnv array

    env of the plugin, struct consisting of the following fields

    • name string

      name of the env.

    • description string

      description of the env.

    • value string

      value of the env.

  • args PluginArgs

    args of the plugin, struct consisting of the following fields

    • name string

      name of the args.

    • description string

      description of the args.

    • value string array

      values of the args.

  • linux PluginLinux

    • capabilities string array

      capabilities of the plugin (Linux only), see list here

    • allowAllDevices boolean

      If /dev is bind mounted from the host, and allowAllDevices is set to true, the plugin will haverwm access to all devices on the host.

    • devices PluginDevice array

      device of the plugin, (Linux only), struct consisting of the following fields, seeDEVICES

      • name string

        name of the device.

      • description string

        description of the device.

      • path string

        path 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": ""
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值