github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/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  <!-- This file is maintained within the docker/cli GitHub
     8       repository at https://github.com/docker/cli/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # plugin create
    17  
    18  ```markdown
    19  Usage:  docker plugin create [OPTIONS] PLUGIN PLUGIN-DATA-DIR
    20  
    21  Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
    22  
    23  Options:
    24        --compress   Compress the context using gzip
    25        --help       Print usage
    26  ```
    27  
    28  ## Description
    29  
    30  Creates a plugin. Before creating the plugin, prepare the plugin's root filesystem as well as
    31  [the config.json](../../extend/config.md)
    32  
    33  ## Examples
    34  
    35  The following example shows how to create a sample `plugin`.
    36  
    37  ```bash
    38  $ ls -ls /home/pluginDir
    39  
    40  total 4
    41  4 -rw-r--r--  1 root root 431 Nov  7 01:40 config.json
    42  0 drwxr-xr-x 19 root root 420 Nov  7 01:40 rootfs
    43  
    44  $ docker plugin create plugin /home/pluginDir
    45  
    46  plugin
    47  
    48  $ docker plugin ls
    49  
    50  ID                  NAME                TAG                 DESCRIPTION                  ENABLED
    51  672d8144ec02        plugin              latest              A sample plugin for Docker   false
    52  ```
    53  
    54  The plugin can subsequently be enabled for local use or pushed to the public registry.
    55  
    56  ## Related commands
    57  
    58  * [plugin disable](plugin_disable.md)
    59  * [plugin enable](plugin_enable.md)
    60  * [plugin inspect](plugin_inspect.md)
    61  * [plugin install](plugin_install.md)
    62  * [plugin ls](plugin_ls.md)
    63  * [plugin push](plugin_push.md)
    64  * [plugin rm](plugin_rm.md)
    65  * [plugin set](plugin_set.md)
    66  * [plugin upgrade](plugin_upgrade.md)