Documentation
¶
Overview ¶
Package docker provides utility functions for interfacing with Docker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command prepares (but does not start) a Docker command with the specified arguments and scoped to lifetime of the provided context.
func CommandPath ¶
CommandPath returns the absolute path specification to use for invoking Docker. It will use the MUTAGEN_DOCKER_PATH environment variable if provided, otherwise falling back to a platform-specific implementation.
Types ¶
type DaemonConnectionFlags ¶
type DaemonConnectionFlags struct { // Config stores the value of the --config flag. Config string // Host stores the value of the -H/--host flag. Host string // Context stores the value of the -c/--context flag. Context string // TLS indicates the presence of the --tls flag. TLS bool // TLSCACert stores the value of the --tlscacert flag. TLSCACert string // TLSCert stores the value of the --tlscert flag. TLSCert string // TLSKey stores the value of the --tlskey flag. TLSKey string // TLSVerify indicates the presence of the --tlsverify flag. TLSVerify bool }
DaemonConnectionFlags encodes top-level Docker command line flags that control the Docker daemon connection. These flags are shared between the Docker CLI and Docker Compose. These flags can be loaded from Mutagen URL parameters or used as command line flag storage. The zero value of this structure is a valid value corresponding to the absence of any of these flags.
func LoadDaemonConnectionFlagsFromURLParameters ¶
func LoadDaemonConnectionFlagsFromURLParameters(parameters map[string]string) (*DaemonConnectionFlags, error)
LoadDaemonConnectionFlagsFromURLParameters loads top-level Docker daemon connection flags from Mutagen URL parameters.
func (*DaemonConnectionFlags) ToFlags ¶
func (f *DaemonConnectionFlags) ToFlags() []string
ToFlags reconstitues top-level daemon connection flags so that they can be passed to a Docker CLI or Docker Compose command.
func (*DaemonConnectionFlags) ToURLParameters ¶
func (f *DaemonConnectionFlags) ToURLParameters() map[string]string
ToURLParameters converts top-level daemon connection flags to parameters that can be embedded in a Mutagen URL. These parameters can be converted back using LoadDaemonConnectionFlagsFromURLParameters.