mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
1e592349f1
commit
c410222e42
27 changed files with 81 additions and 98 deletions
|
@ -16,7 +16,6 @@ func NewPluginCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
cmd.SetOutput(dockerCli.Err())
|
cmd.SetOutput(dockerCli.Err())
|
||||||
cmd.HelpFunc()(cmd, args)
|
cmd.HelpFunc()(cmd, args)
|
||||||
},
|
},
|
||||||
Tags: map[string]string{"experimental": ""},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.AddCommand(
|
cmd.AddCommand(
|
||||||
|
|
|
@ -21,6 +21,7 @@ type CommonAPIClient interface {
|
||||||
ImageAPIClient
|
ImageAPIClient
|
||||||
NodeAPIClient
|
NodeAPIClient
|
||||||
NetworkAPIClient
|
NetworkAPIClient
|
||||||
|
PluginAPIClient
|
||||||
ServiceAPIClient
|
ServiceAPIClient
|
||||||
SwarmAPIClient
|
SwarmAPIClient
|
||||||
SecretAPIClient
|
SecretAPIClient
|
||||||
|
@ -104,6 +105,19 @@ type NodeAPIClient interface {
|
||||||
NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error
|
NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PluginAPIClient defines API client methods for the plugins
|
||||||
|
type PluginAPIClient interface {
|
||||||
|
PluginList(ctx context.Context) (types.PluginsListResponse, error)
|
||||||
|
PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error
|
||||||
|
PluginEnable(ctx context.Context, name string) error
|
||||||
|
PluginDisable(ctx context.Context, name string) error
|
||||||
|
PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) error
|
||||||
|
PluginPush(ctx context.Context, name string, registryAuth string) error
|
||||||
|
PluginSet(ctx context.Context, name string, args []string) error
|
||||||
|
PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error)
|
||||||
|
PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error
|
||||||
|
}
|
||||||
|
|
||||||
// ServiceAPIClient defines API client methods for the services
|
// ServiceAPIClient defines API client methods for the services
|
||||||
type ServiceAPIClient interface {
|
type ServiceAPIClient interface {
|
||||||
ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error)
|
ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error)
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiClientExperimental interface {
|
type apiClientExperimental interface {
|
||||||
CheckpointAPIClient
|
CheckpointAPIClient
|
||||||
PluginAPIClient
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckpointAPIClient defines API client methods for the checkpoints
|
// CheckpointAPIClient defines API client methods for the checkpoints
|
||||||
|
@ -18,16 +15,3 @@ type CheckpointAPIClient interface {
|
||||||
CheckpointDelete(ctx context.Context, container string, options types.CheckpointDeleteOptions) error
|
CheckpointDelete(ctx context.Context, container string, options types.CheckpointDeleteOptions) error
|
||||||
CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error)
|
CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PluginAPIClient defines API client methods for the plugins
|
|
||||||
type PluginAPIClient interface {
|
|
||||||
PluginList(ctx context.Context) (types.PluginsListResponse, error)
|
|
||||||
PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error
|
|
||||||
PluginEnable(ctx context.Context, name string) error
|
|
||||||
PluginDisable(ctx context.Context, name string) error
|
|
||||||
PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) error
|
|
||||||
PluginPush(ctx context.Context, name string, registryAuth string) error
|
|
||||||
PluginSet(ctx context.Context, name string, args []string) error
|
|
||||||
PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error)
|
|
||||||
PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error
|
|
||||||
}
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import (
|
||||||
"github.com/docker/docker/api/server/router/container"
|
"github.com/docker/docker/api/server/router/container"
|
||||||
"github.com/docker/docker/api/server/router/image"
|
"github.com/docker/docker/api/server/router/image"
|
||||||
"github.com/docker/docker/api/server/router/network"
|
"github.com/docker/docker/api/server/router/network"
|
||||||
|
pluginrouter "github.com/docker/docker/api/server/router/plugin"
|
||||||
swarmrouter "github.com/docker/docker/api/server/router/swarm"
|
swarmrouter "github.com/docker/docker/api/server/router/swarm"
|
||||||
systemrouter "github.com/docker/docker/api/server/router/system"
|
systemrouter "github.com/docker/docker/api/server/router/system"
|
||||||
"github.com/docker/docker/api/server/router/volume"
|
"github.com/docker/docker/api/server/router/volume"
|
||||||
|
@ -38,6 +39,7 @@ import (
|
||||||
"github.com/docker/docker/pkg/plugingetter"
|
"github.com/docker/docker/pkg/plugingetter"
|
||||||
"github.com/docker/docker/pkg/signal"
|
"github.com/docker/docker/pkg/signal"
|
||||||
"github.com/docker/docker/pkg/system"
|
"github.com/docker/docker/pkg/system"
|
||||||
|
"github.com/docker/docker/plugin"
|
||||||
"github.com/docker/docker/registry"
|
"github.com/docker/docker/registry"
|
||||||
"github.com/docker/docker/runconfig"
|
"github.com/docker/docker/runconfig"
|
||||||
"github.com/docker/docker/utils"
|
"github.com/docker/docker/utils"
|
||||||
|
@ -457,6 +459,7 @@ func initRouter(s *apiserver.Server, d *daemon.Daemon, c *cluster.Cluster) {
|
||||||
volume.NewRouter(d),
|
volume.NewRouter(d),
|
||||||
build.NewRouter(dockerfile.NewBuildManager(d)),
|
build.NewRouter(dockerfile.NewBuildManager(d)),
|
||||||
swarmrouter.NewRouter(d, c),
|
swarmrouter.NewRouter(d, c),
|
||||||
|
pluginrouter.NewRouter(plugin.GetManager()),
|
||||||
}...)
|
}...)
|
||||||
|
|
||||||
if d.NetworkControllerEnabled() {
|
if d.NetworkControllerEnabled() {
|
||||||
|
|
|
@ -4,14 +4,12 @@ import (
|
||||||
"github.com/docker/docker/api/server/httputils"
|
"github.com/docker/docker/api/server/httputils"
|
||||||
"github.com/docker/docker/api/server/router"
|
"github.com/docker/docker/api/server/router"
|
||||||
checkpointrouter "github.com/docker/docker/api/server/router/checkpoint"
|
checkpointrouter "github.com/docker/docker/api/server/router/checkpoint"
|
||||||
pluginrouter "github.com/docker/docker/api/server/router/plugin"
|
|
||||||
"github.com/docker/docker/daemon"
|
"github.com/docker/docker/daemon"
|
||||||
"github.com/docker/docker/plugin"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func addExperimentalRouters(routers []router.Router, d *daemon.Daemon, decoder httputils.ContainerDecoder) []router.Router {
|
func addExperimentalRouters(routers []router.Router, d *daemon.Daemon, decoder httputils.ContainerDecoder) []router.Router {
|
||||||
if !d.HasExperimental() {
|
if !d.HasExperimental() {
|
||||||
return []router.Router{}
|
return []router.Router{}
|
||||||
}
|
}
|
||||||
return append(routers, checkpointrouter.NewRouter(d, decoder), pluginrouter.NewRouter(plugin.GetManager()))
|
return append(routers, checkpointrouter.NewRouter(d, decoder))
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ import (
|
||||||
"github.com/docker/docker/daemon/events"
|
"github.com/docker/docker/daemon/events"
|
||||||
"github.com/docker/docker/daemon/exec"
|
"github.com/docker/docker/daemon/exec"
|
||||||
"github.com/docker/docker/dockerversion"
|
"github.com/docker/docker/dockerversion"
|
||||||
|
"github.com/docker/docker/plugin"
|
||||||
"github.com/docker/libnetwork/cluster"
|
"github.com/docker/libnetwork/cluster"
|
||||||
// register graph drivers
|
// register graph drivers
|
||||||
_ "github.com/docker/docker/daemon/graphdriver/register"
|
_ "github.com/docker/docker/daemon/graphdriver/register"
|
||||||
|
@ -1267,3 +1268,16 @@ func (daemon *Daemon) GetCluster() Cluster {
|
||||||
func (daemon *Daemon) SetCluster(cluster Cluster) {
|
func (daemon *Daemon) SetCluster(cluster Cluster) {
|
||||||
daemon.cluster = cluster
|
daemon.cluster = cluster
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (daemon *Daemon) pluginInit(cfg *Config, remote libcontainerd.Remote) error {
|
||||||
|
return plugin.Init(cfg.Root, daemon.PluginStore, remote, daemon.RegistryService, cfg.LiveRestoreEnabled, daemon.LogPluginEvent)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (daemon *Daemon) pluginShutdown() {
|
||||||
|
manager := plugin.GetManager()
|
||||||
|
// Check for a valid manager object. In error conditions, daemon init can fail
|
||||||
|
// and shutdown called, before plugin manager is initialized.
|
||||||
|
if manager != nil {
|
||||||
|
manager.Shutdown()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,30 +1,7 @@
|
||||||
package daemon
|
package daemon
|
||||||
|
|
||||||
import (
|
import "github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/api/types/container"
|
|
||||||
"github.com/docker/docker/libcontainerd"
|
|
||||||
"github.com/docker/docker/plugin"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (daemon *Daemon) verifyExperimentalContainerSettings(hostConfig *container.HostConfig, config *container.Config) ([]string, error) {
|
func (daemon *Daemon) verifyExperimentalContainerSettings(hostConfig *container.HostConfig, config *container.Config) ([]string, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (daemon *Daemon) pluginInit(cfg *Config, remote libcontainerd.Remote) error {
|
|
||||||
if !daemon.HasExperimental() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return plugin.Init(cfg.Root, daemon.PluginStore, remote, daemon.RegistryService, cfg.LiveRestoreEnabled, daemon.LogPluginEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (daemon *Daemon) pluginShutdown() {
|
|
||||||
if !daemon.HasExperimental() {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
manager := plugin.GetManager()
|
|
||||||
// Check for a valid manager object. In error conditions, daemon init can fail
|
|
||||||
// and shutdown called, before plugin manager is initialized.
|
|
||||||
if manager != nil {
|
|
||||||
manager.Shutdown()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ aliases: [
|
||||||
title: "Plugin config"
|
title: "Plugin config"
|
||||||
description: "How develop and use a plugin with the managed plugin system"
|
description: "How develop and use a plugin with the managed plugin system"
|
||||||
keywords: "API, Usage, plugins, documentation, developer"
|
keywords: "API, Usage, plugins, documentation, developer"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -19,8 +18,8 @@ advisory: "experimental"
|
||||||
|
|
||||||
# Plugin Config Version 0 of Plugin V2
|
# Plugin Config Version 0 of Plugin V2
|
||||||
|
|
||||||
This document outlines the format of the V0 plugin config. The plugin
|
This document outlines the format of the V0 plugin configuration. The plugin
|
||||||
config described herein was introduced in the Docker daemon (experimental version) in the [v1.12.0
|
config described herein was introduced in the Docker daemon in the [v1.12.0
|
||||||
release](https://github.com/docker/docker/commit/f37117045c5398fd3dca8016ea8ca0cb47e7312b).
|
release](https://github.com/docker/docker/commit/f37117045c5398fd3dca8016ea8ca0cb47e7312b).
|
||||||
|
|
||||||
Plugin configs describe the various constituents of a docker plugin. Plugin
|
Plugin configs describe the various constituents of a docker plugin. Plugin
|
||||||
|
@ -171,7 +170,6 @@ Config provides the base accessible fields for working with V0 plugin format
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"configVersion": "v0",
|
|
||||||
"description": "A test plugin for Docker",
|
"description": "A test plugin for Docker",
|
||||||
"documentation": "https://docs.docker.com/engine/extend/plugins/",
|
"documentation": "https://docs.docker.com/engine/extend/plugins/",
|
||||||
"entrypoint": ["plugin-no-remove", "/data"],
|
"entrypoint": ["plugin-no-remove", "/data"],
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
advisory: experimental
|
|
||||||
aliases:
|
aliases:
|
||||||
- /engine/extend/
|
- /engine/extend/
|
||||||
description: Develop and use a plugin with the managed plugin system
|
description: Develop and use a plugin with the managed plugin system
|
||||||
|
@ -18,9 +17,6 @@ title: Managed plugin system
|
||||||
|
|
||||||
# Docker Engine managed plugin system
|
# Docker Engine managed plugin system
|
||||||
|
|
||||||
This document describes the plugin system available today in the **experimental
|
|
||||||
build** of Docker 1.12:
|
|
||||||
|
|
||||||
* [Installing and using a plugin](index.md#installing-and-using-a-plugin)
|
* [Installing and using a plugin](index.md#installing-and-using-a-plugin)
|
||||||
* [Developing a plugin](index.md#developing-a-plugin)
|
* [Developing a plugin](index.md#developing-a-plugin)
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ keywords: "Examples, Usage, plugins, docker, documentation, user guide"
|
||||||
# Use Docker Engine plugins
|
# Use Docker Engine plugins
|
||||||
|
|
||||||
This document describes the Docker Engine plugins generally available in Docker
|
This document describes the Docker Engine plugins generally available in Docker
|
||||||
Engine. To view information on plugins managed by Docker Engine currently in
|
Engine. To view information on plugins managed by Docker,
|
||||||
experimental status, refer to [Docker Engine plugin system](index.md).
|
refer to [Docker Engine plugin system](index.md).
|
||||||
|
|
||||||
You can extend the capabilities of the Docker Engine by loading third-party
|
You can extend the capabilities of the Docker Engine by loading third-party
|
||||||
plugins. This page explains the types of plugins and provides links to several
|
plugins. This page explains the types of plugins and provides links to several
|
||||||
|
|
|
@ -19,8 +19,7 @@ Docker plugins are out-of-process extensions which add capabilities to the
|
||||||
Docker Engine.
|
Docker Engine.
|
||||||
|
|
||||||
This document describes the Docker Engine plugin API. To view information on
|
This document describes the Docker Engine plugin API. To view information on
|
||||||
plugins managed by Docker Engine currently in experimental status, refer to
|
plugins managed by Docker Engine, refer to [Docker Engine plugin system](index.md).
|
||||||
[Docker Engine plugin system](index.md).
|
|
||||||
|
|
||||||
This page is intended for people who want to develop their own Docker plugin.
|
This page is intended for people who want to develop their own Docker plugin.
|
||||||
If you just want to learn about or use Docker plugins, look
|
If you just want to learn about or use Docker plugins, look
|
||||||
|
|
|
@ -17,8 +17,8 @@ aliases: ["/engine/extend/authorization/"]
|
||||||
# Create an authorization plugin
|
# Create an authorization plugin
|
||||||
|
|
||||||
This document describes the Docker Engine plugins generally available in Docker
|
This document describes the Docker Engine plugins generally available in Docker
|
||||||
Engine. To view information on plugins managed by Docker Engine currently in
|
Engine. To view information on plugins managed by Docker Engine,
|
||||||
experimental status, refer to [Docker Engine plugin system](index.md).
|
refer to [Docker Engine plugin system](index.md).
|
||||||
|
|
||||||
Docker's out-of-the-box authorization model is all or nothing. Any user with
|
Docker's out-of-the-box authorization model is all or nothing. Any user with
|
||||||
permission to access the Docker daemon can run any Docker client command. The
|
permission to access the Docker daemon can run any Docker client command. The
|
||||||
|
|
|
@ -184,6 +184,16 @@ This section lists each version from latest to oldest. Each listing includes a
|
||||||
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `TTY` parameter, which allocate a pseudo-TTY in container.
|
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `TTY` parameter, which allocate a pseudo-TTY in container.
|
||||||
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `DNSConfig` parameter, which specifies DNS related configurations in resolver configuration file (resolv.conf) through `Nameservers`, `Search`, and `Options`.
|
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `DNSConfig` parameter, which specifies DNS related configurations in resolver configuration file (resolv.conf) through `Nameservers`, `Search`, and `Options`.
|
||||||
* `GET /networks/(id or name)` now includes IP and name of all peers nodes for swarm mode overlay networks.
|
* `GET /networks/(id or name)` now includes IP and name of all peers nodes for swarm mode overlay networks.
|
||||||
|
* `GET /plugins` list plugins.
|
||||||
|
* `POST /plugins/pull?name=<plugin name>` pulls a plugin.
|
||||||
|
* `GET /plugins/(plugin name)` inspect a plugin.
|
||||||
|
* `POST /plugins/(plugin name)/set` configure a plugin.
|
||||||
|
* `POST /plugins/(plugin name)/enable` enable a plugin.
|
||||||
|
* `POST /plugins/(plugin name)/disable` disable a plugin.
|
||||||
|
* `POST /plugins/(plugin name)/push` push a pluging.
|
||||||
|
* `POST /plugins/create?name=(plugin name)` create a plugin.
|
||||||
|
* `DELETE /plugins/(plugin name)` delete a plugin.
|
||||||
|
|
||||||
|
|
||||||
### v1.24 API changes
|
### v1.24 API changes
|
||||||
|
|
||||||
|
|
|
@ -4291,7 +4291,7 @@ Content-Type: application/json
|
||||||
|
|
||||||
### Configure a plugin
|
### Configure a plugin
|
||||||
|
|
||||||
POST /plugins/(plugin name)/set`
|
`POST /plugins/(plugin name)/set`
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
@ -4438,11 +4438,9 @@ Content-Type: text/plain; charset=utf-8
|
||||||
- **204** - no error
|
- **204** - no error
|
||||||
- **500** - server error
|
- **500** - server error
|
||||||
|
|
||||||
<!-- TODO Document "docker plugin push" endpoint once we have "plugin build"
|
|
||||||
|
|
||||||
### Push a plugin
|
### Push a plugin
|
||||||
|
|
||||||
`POST /v1.25/plugins/tiborvass/(plugin name)/push HTTP/1.1`
|
`POST /v1.25/plugins/(plugin name)/push`
|
||||||
|
|
||||||
Pushes a plugin to the registry.
|
Pushes a plugin to the registry.
|
||||||
|
|
||||||
|
@ -4464,7 +4462,6 @@ an image](#create-an-image) section for more details.
|
||||||
- **200** - no error
|
- **200** - no error
|
||||||
- **404** - plugin not installed
|
- **404** - plugin not installed
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
## 3.7 Nodes
|
## 3.7 Nodes
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "plugin create (experimental)"
|
title: "plugin create"
|
||||||
description: "the plugin create command description and usage"
|
description: "the plugin create command description and usage"
|
||||||
keywords: "plugin, create"
|
keywords: "plugin, create"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,10 +13,12 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
# plugin create
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin create [OPTIONS] reponame[:tag] PATH-TO-ROOTFS
|
Usage: docker plugin create [OPTIONS] reponame[:tag] PATH-TO-ROOTFS
|
||||||
|
|
||||||
create a plugin from the given PATH-TO-ROOTFS, which contains the plugin's root filesystem and the config file, config.json
|
Create a plugin from a rootfs and configuration
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--compress Compress the context using gzip
|
--compress Compress the context using gzip
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin disable"
|
title: "plugin disable"
|
||||||
description: "the plugin disable command description and usage"
|
description: "the plugin disable command description and usage"
|
||||||
keywords: "plugin, disable"
|
keywords: "plugin, disable"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin disable (experimental)
|
# plugin disable
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin disable PLUGIN
|
Usage: docker plugin disable PLUGIN
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin enable"
|
title: "plugin enable"
|
||||||
description: "the plugin enable command description and usage"
|
description: "the plugin enable command description and usage"
|
||||||
keywords: "plugin, enable"
|
keywords: "plugin, enable"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin enable (experimental)
|
# plugin enable
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin enable PLUGIN
|
Usage: docker plugin enable PLUGIN
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin inspect"
|
title: "plugin inspect"
|
||||||
description: "The plugin inspect command description and usage"
|
description: "The plugin inspect command description and usage"
|
||||||
keywords: "plugin, inspect"
|
keywords: "plugin, inspect"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin inspect (experimental)
|
# plugin inspect
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...]
|
Usage: docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin install"
|
title: "plugin install"
|
||||||
description: "the plugin install command description and usage"
|
description: "the plugin install command description and usage"
|
||||||
keywords: "plugin, install"
|
keywords: "plugin, install"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin install (experimental)
|
# plugin install
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin install [OPTIONS] PLUGIN [KEY=VALUE...]
|
Usage: docker plugin install [OPTIONS] PLUGIN [KEY=VALUE...]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin ls"
|
title: "plugin ls"
|
||||||
description: "The plugin ls command description and usage"
|
description: "The plugin ls command description and usage"
|
||||||
keywords: "plugin, list"
|
keywords: "plugin, list"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin ls (experimental)
|
# plugin ls
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin ls [OPTIONS]
|
Usage: docker plugin ls [OPTIONS]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin rm"
|
title: "plugin rm"
|
||||||
description: "the plugin rm command description and usage"
|
description: "the plugin rm command description and usage"
|
||||||
keywords: "plugin, rm"
|
keywords: "plugin, rm"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin rm (experimental)
|
# plugin rm
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin rm [OPTIONS] PLUGIN [PLUGIN...]
|
Usage: docker plugin rm [OPTIONS] PLUGIN [PLUGIN...]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
title: "plugin set"
|
title: "plugin set"
|
||||||
description: "the plugin set command description and usage"
|
description: "the plugin set command description and usage"
|
||||||
keywords: "plugin, set"
|
keywords: "plugin, set"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/docker Github
|
<!-- This file is maintained within the docker/docker Github
|
||||||
|
@ -14,7 +13,7 @@ advisory: "experimental"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# plugin set (experimental)
|
# plugin set
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker plugin set PLUGIN KEY=VALUE [KEY=VALUE...]
|
Usage: docker plugin set PLUGIN KEY=VALUE [KEY=VALUE...]
|
||||||
|
|
|
@ -30,7 +30,7 @@ type DockerAuthzV2Suite struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerAuthzV2Suite) SetUpTest(c *check.C) {
|
func (s *DockerAuthzV2Suite) SetUpTest(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
s.d = NewDaemon(c)
|
s.d = NewDaemon(c)
|
||||||
c.Assert(s.d.Start(), check.IsNil)
|
c.Assert(s.d.Start(), check.IsNil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ var pluginName = "tiborvass/no-remove"
|
||||||
|
|
||||||
// TestDaemonRestartWithPluginEnabled tests state restore for an enabled plugin
|
// TestDaemonRestartWithPluginEnabled tests state restore for an enabled plugin
|
||||||
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
|
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
|
||||||
testRequires(c, Network, ExperimentalDaemon)
|
testRequires(c, Network)
|
||||||
|
|
||||||
if err := s.d.Start(); err != nil {
|
if err := s.d.Start(); err != nil {
|
||||||
c.Fatalf("Could not start daemon: %v", err)
|
c.Fatalf("Could not start daemon: %v", err)
|
||||||
|
@ -50,7 +50,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
|
||||||
|
|
||||||
// TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin
|
// TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin
|
||||||
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
|
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
|
||||||
testRequires(c, Network, ExperimentalDaemon)
|
testRequires(c, Network)
|
||||||
|
|
||||||
if err := s.d.Start(); err != nil {
|
if err := s.d.Start(); err != nil {
|
||||||
c.Fatalf("Could not start daemon: %v", err)
|
c.Fatalf("Could not start daemon: %v", err)
|
||||||
|
@ -81,7 +81,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
|
||||||
// TestDaemonKillLiveRestoreWithPlugins SIGKILLs daemon started with --live-restore.
|
// TestDaemonKillLiveRestoreWithPlugins SIGKILLs daemon started with --live-restore.
|
||||||
// Plugins should continue to run.
|
// Plugins should continue to run.
|
||||||
func (s *DockerDaemonSuite) TestDaemonKillLiveRestoreWithPlugins(c *check.C) {
|
func (s *DockerDaemonSuite) TestDaemonKillLiveRestoreWithPlugins(c *check.C) {
|
||||||
testRequires(c, Network, ExperimentalDaemon)
|
testRequires(c, Network)
|
||||||
|
|
||||||
if err := s.d.Start("--live-restore"); err != nil {
|
if err := s.d.Start("--live-restore"); err != nil {
|
||||||
c.Fatalf("Could not start daemon: %v", err)
|
c.Fatalf("Could not start daemon: %v", err)
|
||||||
|
@ -114,7 +114,7 @@ func (s *DockerDaemonSuite) TestDaemonKillLiveRestoreWithPlugins(c *check.C) {
|
||||||
// TestDaemonShutdownLiveRestoreWithPlugins SIGTERMs daemon started with --live-restore.
|
// TestDaemonShutdownLiveRestoreWithPlugins SIGTERMs daemon started with --live-restore.
|
||||||
// Plugins should continue to run.
|
// Plugins should continue to run.
|
||||||
func (s *DockerDaemonSuite) TestDaemonShutdownLiveRestoreWithPlugins(c *check.C) {
|
func (s *DockerDaemonSuite) TestDaemonShutdownLiveRestoreWithPlugins(c *check.C) {
|
||||||
testRequires(c, Network, ExperimentalDaemon)
|
testRequires(c, Network)
|
||||||
|
|
||||||
if err := s.d.Start("--live-restore"); err != nil {
|
if err := s.d.Start("--live-restore"); err != nil {
|
||||||
c.Fatalf("Could not start daemon: %v", err)
|
c.Fatalf("Could not start daemon: %v", err)
|
||||||
|
@ -146,7 +146,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownLiveRestoreWithPlugins(c *check.C)
|
||||||
|
|
||||||
// TestDaemonShutdownWithPlugins shuts down running plugins.
|
// TestDaemonShutdownWithPlugins shuts down running plugins.
|
||||||
func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
|
func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
|
||||||
testRequires(c, Network, ExperimentalDaemon)
|
testRequires(c, Network)
|
||||||
|
|
||||||
if err := s.d.Start(); err != nil {
|
if err := s.d.Start(); err != nil {
|
||||||
c.Fatalf("Could not start daemon: %v", err)
|
c.Fatalf("Could not start daemon: %v", err)
|
||||||
|
@ -185,7 +185,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
|
||||||
|
|
||||||
// TestVolumePlugin tests volume creation using a plugin.
|
// TestVolumePlugin tests volume creation using a plugin.
|
||||||
func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
|
func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
|
||||||
testRequires(c, Network, ExperimentalDaemon)
|
testRequires(c, Network)
|
||||||
|
|
||||||
volName := "plugin-volume"
|
volName := "plugin-volume"
|
||||||
volRoot := "/data"
|
volRoot := "/data"
|
|
@ -276,7 +276,7 @@ func (s *DockerSuite) TestEventsImageLoad(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestEventsPluginOps(c *check.C) {
|
func (s *DockerSuite) TestEventsPluginOps(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon)
|
testRequires(c, DaemonIsLinux)
|
||||||
|
|
||||||
pluginName := "tiborvass/no-remove:latest"
|
pluginName := "tiborvass/no-remove:latest"
|
||||||
since := daemonUnixTime(c)
|
since := daemonUnixTime(c)
|
||||||
|
|
|
@ -769,7 +769,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDriverOptions(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerNetworkSuite) TestDockerPluginV2NetworkDriver(c *check.C) {
|
func (s *DockerNetworkSuite) TestDockerPluginV2NetworkDriver(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
npName = "mavenugo/test-docker-netplugin"
|
npName = "mavenugo/test-docker-netplugin"
|
||||||
|
|
|
@ -16,7 +16,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
|
func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
_, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
|
_, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginForceRemove(c *check.C) {
|
func (s *DockerSuite) TestPluginForceRemove(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
|
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ func (s *DockerSuite) TestPluginForceRemove(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginActive(c *check.C) {
|
func (s *DockerSuite) TestPluginActive(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
|
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ func (s *DockerSuite) TestPluginActive(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginInstallDisable(c *check.C) {
|
func (s *DockerSuite) TestPluginInstallDisable(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
|
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
||||||
|
@ -110,7 +110,7 @@ func (s *DockerSuite) TestPluginInstallDisable(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginInstallDisableVolumeLs(c *check.C) {
|
func (s *DockerSuite) TestPluginInstallDisableVolumeLs(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
|
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
||||||
|
@ -119,7 +119,7 @@ func (s *DockerSuite) TestPluginInstallDisableVolumeLs(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginSet(c *check.C) {
|
func (s *DockerSuite) TestPluginSet(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _ := dockerCmd(c, "plugin", "install", "--grant-all-permissions", "--disable", pName)
|
out, _ := dockerCmd(c, "plugin", "install", "--grant-all-permissions", "--disable", pName)
|
||||||
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ func (s *DockerSuite) TestPluginSet(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginInstallArgs(c *check.C) {
|
func (s *DockerSuite) TestPluginInstallArgs(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _ := dockerCmd(c, "plugin", "install", "--grant-all-permissions", "--disable", pName, "DEBUG=1")
|
out, _ := dockerCmd(c, "plugin", "install", "--grant-all-permissions", "--disable", pName, "DEBUG=1")
|
||||||
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
||||||
|
|
||||||
|
@ -142,14 +142,14 @@ func (s *DockerSuite) TestPluginInstallArgs(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginInstallImage(c *check.C) {
|
func (s *DockerSuite) TestPluginInstallImage(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon)
|
testRequires(c, DaemonIsLinux)
|
||||||
out, _, err := dockerCmdWithError("plugin", "install", "redis")
|
out, _, err := dockerCmdWithError("plugin", "install", "redis")
|
||||||
c.Assert(err, checker.NotNil)
|
c.Assert(err, checker.NotNil)
|
||||||
c.Assert(out, checker.Contains, "content is not a plugin")
|
c.Assert(out, checker.Contains, "content is not a plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPluginEnableDisableNegative(c *check.C) {
|
func (s *DockerSuite) TestPluginEnableDisableNegative(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pName)
|
out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pName)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
||||||
|
|
Loading…
Add table
Reference in a new issue