Documentation ¶
Index ¶
- Constants
- Variables
- func GetDockerClient() (*command.DockerCli, error)
- func New() install.Driver
- type ConfigurationOption
- type Driver
- func (d *Driver) ApplyConfigurationOptions() error
- func (d *Driver) Exec(op *install.Operation) (*install.OperationResult, error)
- func (d *Driver) GetContainerConfig() (container.Config, error)
- func (d *Driver) GetContainerHostConfig() (container.HostConfig, 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 ( OptionQuiet = "DOCKER_DRIVER_QUIET" OptionCleanup = "CLEANUP_CONTAINERS" OptionPullPolicy = "PULL_POLICY" PullPolicyAlways = "Always" PullPolicyNever = "Never" PullPolicyIfNotPresent = "IfNotPresent" OptionNetworkMode = "NETWORK_MODE" OptionUsernsMode = "USERNS_MODE" )
Variables ¶
var Options = set.New[string]( OptionQuiet, OptionCleanup, OptionPullPolicy, OptionNetworkMode, OptionUsernsMode, )
Functions ¶
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.
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 ¶
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.