docker plugin create

Estimated reading time: 2 minutes

Description

Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.

Usage

docker plugin create [OPTIONS] PLUGIN PLUGIN-DATA-DIR

Options

Name, shorthand Default Description
--compress false Compress the context using gzip

Parent command

Command Description
docker plugin Manage plugins
Command Description
docker plugin create Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
docker plugin disable Disable a plugin
docker plugin enable Enable a plugin
docker plugin inspect Display detailed information on one or more plugins
docker plugin install Install a plugin
docker plugin ls List plugins
docker plugin push Push a plugin to a registry
docker plugin rm Remove one or more plugins
docker plugin set Change settings for a plugin
docker plugin upgrade Upgrade an existing plugin

Extended description

Creates a plugin. Before creating the plugin, prepare the plugin’s root filesystem as well as the config.json

Examples

The following example shows how to create a sample plugin.

$ ls -ls /home/pluginDir

total 4
4 -rw-r--r--  1 root root 431 Nov  7 01:40 config.json
0 drwxr-xr-x 19 root root 420 Nov  7 01:40 rootfs

$ docker plugin create plugin /home/pluginDir

plugin

$ docker plugin ls

ID                  NAME                TAG                 DESCRIPTION                  ENABLED
672d8144ec02        plugin              latest              A sample plugin for Docker   false

The plugin can subsequently be enabled for local use or pushed to the public registry.