Versions in this module Expand all Collapse all v1 v1.0.0 Jun 26, 2026 Changes in this version + var DefaultCleanupTimeout = 15 * time.Second + var DefaultPullTimeout = time.Minute + var DefaultReadyTimeout = 2 * time.Second + var DefaultTimeout = time.Minute + func Run(t *testing.T, imgName string, opts Options, ...) + func RunContext(ctx context.Context, logger Logger, imgName string, opts Options, ...) (retErr error) + type ContainerInfo struct + ID string + ImageName string + Name string + Ports nat.PortMap + func (c ContainerInfo) FirstPort() (hostIP string, hostPort string, err error) + func (c ContainerInfo) FirstUDPPort() (hostIP string, hostPort string, err error) + func (c ContainerInfo) Port(containerPort uint16) (hostIP string, hostPort string, err error) + func (c ContainerInfo) String() string + func (c ContainerInfo) UDPPort(containerPort uint16) (hostIP string, hostPort string, err error) + type Logger interface + Log func(...interface{}) + type Options struct + CleanupImage bool + CleanupTimeout time.Duration + Cmd []string + Entrypoint []string + Env map[string]string + ExposedPorts nat.PortSet + Hostname string + LogStderr bool + LogStdout bool + Mounts []mount.Mount + Platform string + PortBindings nat.PortMap + PortRequired bool + PullRegistryAuth string + PullTimeout time.Duration + ReadyFunc func(context.Context, ContainerInfo) bool + ReadyTimeout time.Duration + ShmSize int64 + Timeout time.Duration + Volumes []string