Documentation ¶
Index ¶
- Constants
- func BuildDockerClientOptions() *cliflags.ClientOptions
- func GetDockerClient() (*command.DockerCli, error)
- type ConfigurationOption
- type Driver
- func (d *Driver) AddConfigurationOptions(opts ...ConfigurationOption)
- func (d *Driver) ApplyConfigurationOptions() error
- func (d *Driver) Config() map[string]string
- func (d *Driver) GetContainerConfig() (container.Config, error)
- func (d *Driver) GetContainerHostConfig() (container.HostConfig, error)
- func (d *Driver) Handles(dt string) bool
- func (d *Driver) Run(op *driver.Operation) (driver.OperationResult, error)
- func (d *Driver) SetConfig(settings map[string]string) error
- func (d *Driver) SetContainerErr(w io.Writer)
- func (d *Driver) SetContainerOut(w io.Writer)
- func (d *Driver) SetDockerCli(dockerCli command.Cli)
Constants ¶
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" )
const ( // SettingNetwork is the environment variable for the driver that specifies // the docker network to which the invocation image should be attached. SettingNetwork = "DOCKER_NETWORK" )
Variables ¶
This section is empty.
Functions ¶
func BuildDockerClientOptions ¶
func BuildDockerClientOptions() *cliflags.ClientOptions
BuildDockerClientOptions manually handles DOCKER_TLS_VERIFY and DOCKER_CERT_PATH because the docker cli library only binds these values when initializing its cli flags. There isn't other parts of the library that we can take advantage of to get these values for "free".
DOCKER_HOST however is retrieved dynamically later so that doesn't require additional configuration.
func GetDockerClient ¶
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.
Types ¶
type ConfigurationOption ¶
type ConfigurationOption func(*container.Config, *container.HostConfig) error
ConfigurationOption is an option used to customize docker driver container and host config
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) AddConfigurationOptions ¶
func (d *Driver) AddConfigurationOptions(opts ...ConfigurationOption)
AddConfigurationOptions adds configuration callbacks to the driver
func (*Driver) ApplyConfigurationOptions ¶
ApplyConfigurationOptions applies the configuration options set on the driver by the user.
func (*Driver) GetContainerConfig ¶
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) SetContainerErr ¶
SetContainerErr sets the container error stream
func (*Driver) SetContainerOut ¶
SetContainerOut sets the container output stream
func (*Driver) SetDockerCli ¶
SetDockerCli makes the driver use an already initialized cli