docker plugin inspect

1つまたは複数プラグインの詳細情報を表示します。

【API 1.25+】このコマンドを使うには、クライアントとデーモン API の両方が、少なくとも 1.25 の必要があります。クライアントとデーモン API のバージョンを調べるには、 docker version コマンドを使います。

使い方

$ docker plugin enable [OPTIONS] PLUGINl

補足説明

プラグインに関する情報を返します。デフォルトでは 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 plugin プラグインを管理

関連コマンド

コマンド 説明
docker plugin create rootfs と設定からプラグインを作成。プラグインのデータディレクトリには、 config.json と rootfs ディレクトリが必須
docker plugin disable プラグインの無効化
docker plugin enable プラグインの有効化
docker plugin inspect 1つまたは複数プラグインの詳細情報を表示
docker plugin install プラグインをインストール
docker plugin ls プラグイン一覧表示
docker plugin rm 1つまたは複数プラグインを削除
docker plugin set プラグインの設定を変更
docker plugin upgrade 既存のプラグインを更新