码头插件检查

描述

显示有关一个或多个插件的详细信息

API 1.25+  客户端和守护程序API都必须至少为 1.25, 才能使用此命令。docker version在客户端上使用命令检查客户端和守护程序API版本。

用法

$ docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...]

扩展说明

返回有关插件的信息。默认情况下,此命令将所有结果呈现在JSON数组中。

有关此命令的示例用法,请参阅下面的示例部分

选项

名称,简写 默认 描述
--format-f 使用给定的Go模板格式化输出

例子

检查插件

以下示例检查tiborvass/sample-volume-plugin插件:

$ docker plugin inspect tiborvass/sample-volume-plugin:latest

输出为JSON格式(以下输出经过格式化以提高可读性):

{
  "Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
  "Name": "tiborvass/sample-volume-plugin:latest",
  "PluginReference": "tiborvas/sample-volume-plugin:latest",
  "Enabled": true,
  "Config": {
    "Mounts": [
      {
        "Name": "",
        "Description": "",
        "Settable": null,
        "Source": "/data",
        "Destination": "/data",
        "Type": "bind",
        "Options": [
          "shared",
          "rbind"
        ]
      },
      {
        "Name": "",
        "Description": "",
        "Settable": null,
        "Source": null,
        "Destination": "/foobar",
        "Type": "tmpfs",
        "Options": null
      }
    ],
    "Env": [
      "DEBUG=1"
    ],
    "Args": null,
    "Devices": null
  },
  "Manifest": {
    "ManifestVersion": "v0",
    "Description": "A test plugin for Docker",
    "Documentation": "https://docs.docker.com/engine/extend/plugins/",
    "Interface": {
      "Types": [
        "docker.volumedriver/1.0"
      ],
      "Socket": "plugins.sock"
    },
    "Entrypoint": [
      "plugin-sample-volume-plugin",
      "/data"
    ],
    "Workdir": "",
    "User": {
    },
    "Network": {
      "Type": "host"
    },
    "Capabilities": null,
    "Mounts": [
      {
        "Name": "",
        "Description": "",
        "Settable": null,
        "Source": "/data",
        "Destination": "/data",
        "Type": "bind",
        "Options": [
          "shared",
          "rbind"
        ]
      },
      {
        "Name": "",
        "Description": "",
        "Settable": null,
        "Source": null,
        "Destination": "/foobar",
        "Type": "tmpfs",
        "Options": null
      }
    ],
    "Devices": [
      {
        "Name": "device",
        "Description": "a host device to mount",
        "Settable": null,
        "Path": "/dev/cpu_dma_latency"
      }
    ],
    "Env": [
      {
        "Name": "DEBUG",
        "Description": "If set, prints debug messages",
        "Settable": null,
        "Value": "1"
      }
    ],
    "Args": {
      "Name": "args",
      "Description": "command line arguments",
      "Settable": null,
      "Value": [

      ]
    }
  }
}

格式化输出

$ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest

8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21

上级命令

命令 描述
码头工人插件 管理插件
命令 描述
docker插件创建 从rootfs和配置创建一个插件。插件数据目录必须包含config.json和rootfs目录。
docker插件禁用 禁用插件
docker插件启用 启用插件
码头插件检查 显示有关一个或多个插件的详细信息
docker插件安装 安装插件
码头工人ls 列出插件
docker插件推送 将插件推送到注册表
docker插件rm 删除一个或多个插件
码头工人插件集 更改插件的设置
Docker插件升级 升级现有插件