docker

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DockerTLSVerifyEnvVar is the Docker environment variable that indicates that
	// Docker socket is protected with TLS.
	DockerTLSVerifyEnvVar = "DOCKER_TLS_VERIFY"

	// DockerCertPathEnvVar is the Docker environment variable that specifies a
	// custom path to the TLS certificates for the Docker socket.
	DockerCertPathEnvVar = "DOCKER_CERT_PATH"
)
View Source
const (
	OptionQuiet            = "DOCKER_DRIVER_QUIET"
	OptionCleanup          = "CLEANUP_CONTAINERS"
	OptionPullPolicy       = "PULL_POLICY"
	PullPolicyAlways       = "Always"
	PullPolicyNever        = "Never"
	PullPolicyIfNotPresent = "IfNotPresent"
	OptionNetworkMode      = "NETWORK_MODE"
	OptionUsernsMode       = "USERNS_MODE"
)

Variables

Functions

func GetDockerClient

func GetDockerClient() (*command.DockerCli, error)

GetDockerClient creates a Docker CLI client that uses the user's Docker configuration such as environment variables and the Docker home directory to initialize the client.

func New

func New() install.Driver

Types

type ConfigurationOption

type ConfigurationOption func(*container.Config, *container.HostConfig) error

ConfigurationOption is an option used to customize docker driver container and host config.

func NetworkModeOpt added in v0.3.0

func NetworkModeOpt(mode string) ConfigurationOption

func UsernsModeOpt added in v0.3.0

func UsernsModeOpt(mode string) ConfigurationOption

type Driver

type Driver struct {

	// If true, this will not actually run Docker
	Simulate bool
	// contains filtered or unexported fields
}

Driver is capable of running Docker invocation images using Docker itself.

func (*Driver) ApplyConfigurationOptions

func (d *Driver) ApplyConfigurationOptions() error

ApplyConfigurationOptions applies the configuration options set on the driver by the user.

func (*Driver) Exec

func (*Driver) GetContainerConfig

func (d *Driver) GetContainerConfig() (container.Config, error)

GetContainerConfig returns a copy of the container configuration used by the driver during container exec.

func (*Driver) GetContainerHostConfig

func (d *Driver) GetContainerHostConfig() (container.HostConfig, error)

GetContainerHostConfig returns a copy of the container host configuration used by the driver during container exec.

func (*Driver) SetConfig

func (d *Driver) SetConfig(settings map[string]string) error

SetConfig sets Docker driver configuration.

func (*Driver) SetContainerErr

func (d *Driver) SetContainerErr(w io.Writer)

SetContainerErr sets the container error stream.

func (*Driver) SetContainerOut

func (d *Driver) SetContainerOut(w io.Writer)

SetContainerOut sets the container output stream.

func (*Driver) SetDockerCli

func (d *Driver) SetDockerCli(dockerCli command.Cli)

SetDockerCli makes the driver use an already initialized cli.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL