docker plugin enable
命令用于显示一个或多个插件的详细信息。默认情况下,此命令将所有结果呈现为JSON数组。
用法
docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...]
选项
名称,简写 | 默认 | 描述 |
---|---|---|
--format, -f |
- | 使用给定的Go模板格式化输出 |
相关子命令
编号 | 命令 | 描述 |
---|---|---|
1 | docker plugin create | 从rootfs 和配置创建一个插件。插件数据目录必须包含config.json 和rootfs 目录。 |
2 | docker plugin disable | 禁用插件 |
3 | docker plugin enable | 启用插件 |
4 | docker plugin inspect | 显示一个或多个插件的详细信息 |
5 | docker plugin install | 安装一个插件 |
6 | docker plugin ls | 列出所有插件 |
7 | docker plugin push | 将插件推送到注册表 |
8 | docker plugin rm | 删除一个或多个插件 |
9 | docker plugin set | 更改插件的设置 |
10 | docker plugin upgrade | 升级现有插件 |
例子
$ docker plugin inspect tiborvass/sample-volume-plugin:latest
{
"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": "http://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