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