2016-11-09 20:49:09 -05:00
|
|
|
# plugin create
|
|
|
|
|
2023-01-06 13:04:05 -05:00
|
|
|
<!---MARKER_GEN_START-->
|
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
|
|
|
|
2023-01-06 13:04:05 -05:00
|
|
|
### Options
|
|
|
|
|
2024-07-03 02:29:57 -04:00
|
|
|
| Name | Type | Default | Description |
|
|
|
|
|:-------------|:-------|:--------|:--------------------------------|
|
|
|
|
| `--compress` | `bool` | | Compress the context using gzip |
|
2023-01-06 13:04:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
2016-10-04 15:01:19 -04:00
|
|
|
|
2017-02-07 18:42:48 -05:00
|
|
|
## Description
|
|
|
|
|
2023-12-13 18:06:16 -05:00
|
|
|
Creates a plugin. Before creating the plugin, prepare the plugin's root
|
2024-02-13 07:40:53 -05:00
|
|
|
filesystem as well as the [config.json](https://docs.docker.com/engine/extend/config/).
|
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`.
|
|
|
|
|
2021-08-21 08:54:14 -04:00
|
|
|
```console
|
2016-10-04 15:01:19 -04:00
|
|
|
$ 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
|
|
|
|
2020-06-18 10:37:36 -04:00
|
|
|
ID NAME 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)
|