2016-10-04 15:01:19 -04:00
|
|
|
---
|
2016-11-09 20:49:09 -05:00
|
|
|
title: "plugin create"
|
2016-10-04 15:01:19 -04:00
|
|
|
description: "the plugin create command description and usage"
|
|
|
|
keywords: "plugin, create"
|
|
|
|
---
|
|
|
|
|
2016-11-09 20:49:09 -05:00
|
|
|
# plugin create
|
|
|
|
|
2016-10-04 15:01:19 -04:00
|
|
|
```markdown
|
2016-12-12 18:05:53 -05:00
|
|
|
Usage: docker plugin create [OPTIONS] PLUGIN PLUGIN-DATA-DIR
|
2016-10-04 15:01:19 -04:00
|
|
|
|
2016-12-12 18:05:53 -05:00
|
|
|
Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
|
2016-10-04 15:01:19 -04:00
|
|
|
|
|
|
|
Options:
|
2017-02-07 18:42:48 -05:00
|
|
|
--compress Compress the context using gzip
|
2016-10-04 15:01:19 -04:00
|
|
|
--help Print usage
|
|
|
|
```
|
|
|
|
|
2017-02-07 18:42:48 -05:00
|
|
|
## Description
|
|
|
|
|
2016-10-04 15:01:19 -04:00
|
|
|
Creates a plugin. Before creating the plugin, prepare the plugin's root filesystem as well as
|
2016-11-25 05:33:04 -05:00
|
|
|
[the config.json](../../extend/config.md)
|
2016-10-04 15:01:19 -04:00
|
|
|
|
2017-02-07 18:42:48 -05:00
|
|
|
## Examples
|
2016-10-04 15:01:19 -04:00
|
|
|
|
|
|
|
The following example shows how to create a sample `plugin`.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ ls -ls /home/pluginDir
|
|
|
|
|
2017-04-27 17:24:49 -04:00
|
|
|
total 4
|
2016-11-07 21:51:47 -05:00
|
|
|
4 -rw-r--r-- 1 root root 431 Nov 7 01:40 config.json
|
2016-10-04 15:01:19 -04:00
|
|
|
0 drwxr-xr-x 19 root root 420 Nov 7 01:40 rootfs
|
|
|
|
|
|
|
|
$ docker plugin create plugin /home/pluginDir
|
2017-02-07 18:42:48 -05:00
|
|
|
|
2016-10-04 15:01:19 -04:00
|
|
|
plugin
|
|
|
|
|
2016-12-29 04:35:47 -05:00
|
|
|
$ docker plugin ls
|
2017-02-07 18:42:48 -05:00
|
|
|
|
2016-12-29 04:35:47 -05:00
|
|
|
ID NAME TAG DESCRIPTION ENABLED
|
|
|
|
672d8144ec02 plugin latest A sample plugin for Docker false
|
2016-10-04 15:01:19 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
The plugin can subsequently be enabled for local use or pushed to the public registry.
|
|
|
|
|
2017-02-07 18:42:48 -05:00
|
|
|
## Related commands
|
2016-10-04 15:01:19 -04:00
|
|
|
|
|
|
|
* [plugin disable](plugin_disable.md)
|
2016-11-14 11:38:06 -05:00
|
|
|
* [plugin enable](plugin_enable.md)
|
2016-10-04 15:01:19 -04:00
|
|
|
* [plugin inspect](plugin_inspect.md)
|
|
|
|
* [plugin install](plugin_install.md)
|
2016-11-14 11:38:06 -05:00
|
|
|
* [plugin ls](plugin_ls.md)
|
|
|
|
* [plugin push](plugin_push.md)
|
2016-10-04 15:01:19 -04:00
|
|
|
* [plugin rm](plugin_rm.md)
|
|
|
|
* [plugin set](plugin_set.md)
|
2017-01-28 19:54:32 -05:00
|
|
|
* [plugin upgrade](plugin_upgrade.md)
|