docker: Index | Files | Directories

package plugin

import ""


Package Files


func Create Uses

func Create(ctx context.Context, c CreateClient, name string, opts ...CreateOpt) error

Create creates a new plugin with the specified name

func CreateInRegistry Uses

func CreateInRegistry(ctx context.Context, repo string, auth *types.AuthConfig, opts ...CreateOpt) error

CreateInRegistry makes a plugin (locally) and pushes it to a registry. This does not use a dockerd instance to create or push the plugin. If you just want to create a plugin in some daemon, use `Create`.

This can be useful when testing plugins on swarm where you don't really want the plugin to exist on any of the daemons (immediately) and there needs to be some way to distribute the plugin.

type Config Uses

type Config struct {

    RegistryConfig registry.ServiceOptions
    // contains filtered or unexported fields

Config wraps types.PluginConfig to provide some extra state for options extra customizations on the plugin details, such as using a custom binary to create the plugin with.

type CreateClient Uses

type CreateClient interface {
    PluginCreate(context.Context, io.Reader, types.PluginCreateOptions) error

CreateClient is the interface used for `BuildPlugin` to interact with the daemon.

type CreateOpt Uses

type CreateOpt func(*Config)

CreateOpt is passed used to change the default plugin config before creating it

func WithBinary Uses

func WithBinary(bin string) CreateOpt

WithBinary is a CreateOpt to set an custom binary to create the plugin with. This binary must be statically compiled.

func WithInsecureRegistry Uses

func WithInsecureRegistry(url string) CreateOpt

WithInsecureRegistry specifies that the given registry can skip host-key checking as well as fall back to plain http



Package plugin imports 13 packages (graph). Updated 2020-10-28. Refresh now. Tools for package owners.