Versions in this module Expand all Collapse all v1 v1.14.2 Feb 25, 2025 Changes in this version + const RunOptionsNoPort + const RunOptionsRandomPort + type Address struct + Addr string + PrefixLen int + type BuildOptions struct + BuildArgs map[string]string + BuildFlags map[string]bool + ContextDir string + DockerfilePath string + Image string + NoCache bool + Pull bool + type Client interface + AwaitContainerHealth func(containerID string, timeout *time.Duration) error + Build func(buildOptions *BuildOptions) error + CopyObjectsFromImage func(imageName string, objectsToCopy map[string]string, allowCopyErrors bool) error + CopyObjectsToContainer func(containerName string, objectsToCopy map[string]string) error + CreateNetwork func(*CreateNetworkOptions) error + CreateVolume func(*CreateVolumeOptions) error + DeleteNetwork func(networkName string) error + DeleteVolume func(volumeName string) error + ExecInContainer func(containerID string, execOptions *ExecOptions) error + GetContainerEvents func(containerName string, since string, until string) ([]string, error) + GetContainerIPAddresses func(containerID string) ([]string, error) + GetContainerLogStream func(ctx context.Context, containerID string, logOptions *ContainerLogsOptions) (io.ReadCloser, error) + GetContainerLogs func(containerID string) (string, error) + GetContainerNetworkSettings func(containerID string) (*NetworkSettings, error) + GetContainerPort func(container *Container, boundPort int) (int, error) + GetContainers func(*GetContainerOptions) ([]Container, error) + GetVersion func(quiet bool) (string, error) + Load func(inPath string) error + LogIn func(options *LogInOptions) error + PullImage func(imageURL string) error + PushImage func(imageName string, registryURL string) error + RemoveContainer func(containerID string) error + RemoveImage func(imageName string) error + RunContainer func(imageName string, runOptions *RunOptions) (string, error) + Save func(imageName string, outPath string) error + StartContainer func(containerID string) error + StopContainer func(containerID string) error + type Config struct + AttachStderr bool + AttachStdin bool + AttachStdout bool + Cmd StrSlice + Domainname string + Entrypoint StrSlice + Env []string + Hostname string + Image string + Labels map[string]string + OnBuild []string + OpenStdin bool + StdinOnce bool + Tty bool + User string + Volumes map[string]struct{} + WorkingDir string + type Container struct + AppArmorProfile string + Args []string + Config *Config + Created string + Driver string + ExecIDs []string + HostConfig *HostConfig + HostnamePath string + HostsPath string + ID string + Image string + LogPath string + MountLabel string + Mounts []MountPoint + Name string + NetworkSettings *NetworkSettings + Path string + Platform string + ProcessLabel string + ResolvConfPath string + RestartCount int + State *ContainerState + type ContainerLogsOptions struct + Details bool + Follow bool + ShowStderr bool + ShowStdout bool + Since string + Tail string + Timestamps bool + Until string + type ContainerState struct + Dead bool + Error string + ExitCode int + FinishedAt string + Health *Health + OOMKilled bool + Paused bool + Pid int + Restarting bool + Running bool + StartedAt string + Status string + type CreateNetworkOptions struct + Name string + type CreateVolumeOptions struct + Name string + type DefaultNetworkSettings struct + EndpointID string + Gateway string + GlobalIPv6Address string + GlobalIPv6PrefixLen int + IPAddress string + IPPrefixLen int + IPv6Gateway string + MacAddress string + type EndpointSettings struct + Aliases []string + DriverOpts map[string]string + EndpointID string + Gateway string + GlobalIPv6Address string + GlobalIPv6PrefixLen int + IPAddress string + IPPrefixLen int + IPv6Gateway string + Links []string + MacAddress string + NetworkID string + type ExecOptions struct + Command string + Env map[string]string + Stderr *string + Stdout *string + type GetContainerOptions struct + ID string + Labels map[string]string + Name string + Stopped bool + type Health struct + FailingStreak int + Log []HealthLog + Status string + type HealthLog struct + End string + ExitCode int + Output string + Start string + type HostConfig struct + AutoRemove bool + Binds []string + CapAdd StrSlice + CapDrop StrSlice + Cgroup string + ConsoleSize [2]uint + ContainerIDFile string + DNS []string + DNSOptions []string + DNSSearch []string + ExtraHosts []string + GroupAdd []string + Init *bool + IpcMode string + Isolation string + Links []string + LogConfig LogConfig + NetworkMode string + OomScoreAdj int + PidMode string + PortBindings PortMap + Privileged bool + PublishAllPorts bool + ReadonlyRootfs bool + RestartPolicy RestartPolicy + Runtime string + SecurityOpt []string + ShmSize int64 + StorageOpt map[string]string + Sysctls map[string]string + Tmpfs map[string]string + UTSMode string + UsernsMode string + VolumeDriver string + VolumesFrom []string + type LogConfig struct + Config map[string]string + Type string + type LogInOptions struct + Password string + URL string + Username string + type MockDockerClient struct + func NewMockDockerClient() *MockDockerClient + func (mdc *MockDockerClient) AwaitContainerHealth(containerID string, timeout *time.Duration) error + func (mdc *MockDockerClient) Build(buildOptions *BuildOptions) error + func (mdc *MockDockerClient) CopyObjectsFromImage(imageName string, objectsToCopy map[string]string, allowCopyErrors bool) error + func (mdc *MockDockerClient) CopyObjectsToContainer(containerName string, objectsToCopy map[string]string) error + func (mdc *MockDockerClient) CreateNetwork(options *CreateNetworkOptions) error + func (mdc *MockDockerClient) CreateVolume(options *CreateVolumeOptions) error + func (mdc *MockDockerClient) DeleteNetwork(networkName string) error + func (mdc *MockDockerClient) DeleteVolume(volumeName string) error + func (mdc *MockDockerClient) ExecInContainer(containerID string, execOptions *ExecOptions) error + func (mdc *MockDockerClient) GetContainerEvents(containerName string, since string, until string) ([]string, error) + func (mdc *MockDockerClient) GetContainerIPAddresses(containerID string) ([]string, error) + func (mdc *MockDockerClient) GetContainerLogStream(ctx context.Context, containerID string, logOptions *ContainerLogsOptions) (io.ReadCloser, error) + func (mdc *MockDockerClient) GetContainerLogs(containerID string) (string, error) + func (mdc *MockDockerClient) GetContainerNetworkSettings(containerID string) (*NetworkSettings, error) + func (mdc *MockDockerClient) GetContainerPort(container *Container, boundPort int) (int, error) + func (mdc *MockDockerClient) GetContainers(options *GetContainerOptions) ([]Container, error) + func (mdc *MockDockerClient) GetVersion(quiet bool) (string, error) + func (mdc *MockDockerClient) Load(inPath string) error + func (mdc *MockDockerClient) LogIn(options *LogInOptions) error + func (mdc *MockDockerClient) PullImage(imageURL string) error + func (mdc *MockDockerClient) PushImage(imageName string, registryURL string) error + func (mdc *MockDockerClient) RemoveContainer(containerID string) error + func (mdc *MockDockerClient) RemoveImage(imageName string) error + func (mdc *MockDockerClient) RunContainer(imageName string, runOptions *RunOptions) (string, error) + func (mdc *MockDockerClient) Save(imageName string, outPath string) error + func (mdc *MockDockerClient) StartContainer(containerID string) error + func (mdc *MockDockerClient) StopContainer(containerID string) error + type MountPoint struct + Destination string + Driver string + Mode string + Name string + RW bool + Source string + Type string + type NetworkSettings struct + Networks map[string]*EndpointSettings + type NetworkSettingsBase struct + Bridge string + HairpinMode bool + LinkLocalIPv6Address string + LinkLocalIPv6PrefixLen int + Ports PortMap + SandboxID string + SandboxKey string + SecondaryIPAddresses []Address + SecondaryIPv6Addresses []Address + type Port string + type PortBinding struct + HostIP string + HostPort string + type PortMap map[Port][]PortBinding + type PortSet map[Port]struct + type RestartPolicy struct + MaximumRetryCount int + Name RestartPolicyName + type RestartPolicyName string + const RestartPolicyNameAlways + const RestartPolicyNameNo + const RestartPolicyNameOnFailure + const RestartPolicyNameUnlessStopped + type RunOptions struct + Attach bool + CPUs string + Command string + ContainerName string + Devices []string + Env map[string]string + FSGroup *int64 + GPUs string + ImageMayNotExist bool + Labels map[string]string + Memory string + MountPoints []MountPoint + Network string + Ports map[int]int + Remove bool + RestartPolicy *RestartPolicy + RunAsGroup *int64 + RunAsUser *int64 + Stderr *string + Stdout *string + Volumes map[string]string + type ShellClient struct + func NewShellClient(parentLogger logger.Logger, runner cmdrunner.CmdRunner) (*ShellClient, error) + func (c *ShellClient) AwaitContainerHealth(containerID string, timeout *time.Duration) error + func (c *ShellClient) Build(buildOptions *BuildOptions) error + func (c *ShellClient) CopyObjectsFromImage(imageName string, objectsToCopy map[string]string, allowCopyErrors bool) error + func (c *ShellClient) CopyObjectsToContainer(containerName string, objectsToCopy map[string]string) error + func (c *ShellClient) CreateNetwork(options *CreateNetworkOptions) error + func (c *ShellClient) CreateVolume(options *CreateVolumeOptions) error + func (c *ShellClient) DeleteNetwork(networkName string) error + func (c *ShellClient) DeleteVolume(volumeName string) error + func (c *ShellClient) ExecInContainer(containerID string, execOptions *ExecOptions) error + func (c *ShellClient) GetContainerEvents(containerName string, since string, until string) ([]string, error) + func (c *ShellClient) GetContainerIPAddresses(containerID string) ([]string, error) + func (c *ShellClient) GetContainerLogStream(ctx context.Context, containerID string, logOptions *ContainerLogsOptions) (io.ReadCloser, error) + func (c *ShellClient) GetContainerLogs(containerID string) (string, error) + func (c *ShellClient) GetContainerNetworkSettings(containerID string) (*NetworkSettings, error) + func (c *ShellClient) GetContainerPort(container *Container, boundPort int) (int, error) + func (c *ShellClient) GetContainers(options *GetContainerOptions) ([]Container, error) + func (c *ShellClient) GetVersion(quiet bool) (string, error) + func (c *ShellClient) Load(inPath string) error + func (c *ShellClient) LogIn(options *LogInOptions) error + func (c *ShellClient) PullImage(imageURL string) error + func (c *ShellClient) PushImage(imageName string, registryURL string) error + func (c *ShellClient) RemoveContainer(containerID string) error + func (c *ShellClient) RemoveImage(imageName string) error + func (c *ShellClient) RunContainer(imageName string, runOptions *RunOptions) (string, error) + func (c *ShellClient) Save(imageName string, outPath string) error + func (c *ShellClient) StartContainer(containerID string) error + func (c *ShellClient) StopContainer(containerID string) error + type StrSlice []string + func (e *StrSlice) UnmarshalJSON(b []byte) error