github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/docs/reference/commandline/plugin_create.md (about)

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