Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mount ¶
type Mount struct {
Type MountType
Source string // volume name or host path
Target string // path inside container
}
Mount is a container volume mount.
type PortBinding ¶
PortBinding maps a container port to a host port.
type RunOptions ¶
type RunOptions struct {
Image string
Cmd []string
Env map[string]string
ExposedPorts []string // e.g. ["80/tcp"]
PortBindings map[Port][]PortBinding
Mounts []Mount
Labels map[string]string
PullImages bool
LogLine func(stream, line string) // nil = no logging
}
RunOptions are the options for running a container.
type Runtime ¶
type Runtime interface {
Run(ctx context.Context, opts RunOptions) (Container, error)
Close() error
}
Runtime launches and manages containers.
type RuntimeName ¶
type RuntimeName string
RuntimeName identifies a container runtime backend.
const ( RuntimeDocker RuntimeName = "docker" RuntimeContainerd RuntimeName = "containerd" )
Click to show internal directories.
Click to hide internal directories.