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"
|
|
|
|
---
|
|
|
|
|
|
|
|
<!-- This file is maintained within the docker/docker Github
|
|
|
|
repository at https://github.com/docker/docker/. Make all
|
|
|
|
pull requests against that repo. If you see this file in
|
|
|
|
another repository, consider it read-only there, as it will
|
|
|
|
periodically be overwritten by the definitive file. Pull
|
|
|
|
requests which include edits to this file in other repositories
|
|
|
|
will be rejected.
|
|
|
|
-->
|
|
|
|
|
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:
|
|
|
|
--compress Compress the context using gzip
|
|
|
|
--help Print usage
|
|
|
|
```
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
The following example shows how to create a sample `plugin`.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
$ ls -ls /home/pluginDir
|
|
|
|
|
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
|
|
|
|
plugin
|
|
|
|
|
2016-12-29 04:35:47 -05:00
|
|
|
$ docker plugin ls
|
|
|
|
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.
|
|
|
|
|
|
|
|
## Related information
|
|
|
|
|
|
|
|
* [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)
|