import "github.com/docker/docker/testutil/fixtures/plugin"
Create creates a new plugin with the specified name
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 struct { *types.PluginConfig 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 interface { PluginCreate(context.Context, io.Reader, types.PluginCreateOptions) error }
CreateClient is the interface used for `BuildPlugin` to interact with the daemon.
CreateOpt is passed used to change the default plugin config before creating it
WithBinary is a CreateOpt to set an custom binary to create the plugin with. This binary must be statically compiled.
WithInsecureRegistry specifies that the given registry can skip host-key checking as well as fall back to plain http
Path | Synopsis |
---|---|
basic |
Package plugin imports 13 packages (graph). Updated 2020-10-28. Refresh now. Tools for package owners.