...
1# plugin create
2
3<!---MARKER_GEN_START-->
4Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
5
6### Options
7
8| Name | Type | Default | Description |
9|:-------------|:-----|:--------|:--------------------------------|
10| `--compress` | | | Compress the context using gzip |
11
12
13<!---MARKER_GEN_END-->
14
15## Description
16
17Creates a plugin. Before creating the plugin, prepare the plugin's root
18filesystem as well as the [config.json](https://docs.docker.com/engine/extend/config/).
19
20## Examples
21
22The following example shows how to create a sample `plugin`.
23
24```console
25$ ls -ls /home/pluginDir
26
27total 4
284 -rw-r--r-- 1 root root 431 Nov 7 01:40 config.json
290 drwxr-xr-x 19 root root 420 Nov 7 01:40 rootfs
30
31$ docker plugin create plugin /home/pluginDir
32
33plugin
34
35$ docker plugin ls
36
37ID NAME DESCRIPTION ENABLED
38672d8144ec02 plugin:latest A sample plugin for Docker false
39```
40
41The plugin can subsequently be enabled for local use or pushed to the public registry.
42
43## Related commands
44
45* [plugin disable](plugin_disable.md)
46* [plugin enable](plugin_enable.md)
47* [plugin inspect](plugin_inspect.md)
48* [plugin install](plugin_install.md)
49* [plugin ls](plugin_ls.md)
50* [plugin push](plugin_push.md)
51* [plugin rm](plugin_rm.md)
52* [plugin set](plugin_set.md)
53* [plugin upgrade](plugin_upgrade.md)
View as plain text