Documentation
¶
Index ¶
- func TagFromDir(dir string) (string, error)
- type Address
- type BindMount
- type Container
- type ContainerStatus
- type DockerRunner
- func (r *DockerRunner) Attach(id string) (io.WriteCloser, io.ReadCloser, error)
- func (r *DockerRunner) Build(path string, tag string) error
- func (r *DockerRunner) LogLogs(id string, logger log.Logger) error
- func (r *DockerRunner) Login(username, password, serverAddress string)
- func (r *DockerRunner) Pull(c *Container, output *os.File) error
- func (r *DockerRunner) Push(tag string) error
- func (r *DockerRunner) Start(c *Container) (*ContainerStatus, error)
- func (r *DockerRunner) Stop(id string) error
- func (r *DockerRunner) StopAll() error
- func (r *DockerRunner) TagExists(tag string) (bool, error)
- func (r *DockerRunner) Wait(id string) (int, error)
- type HijackedResponseReader
- type Port
- type PortMapping
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TagFromDir ¶ added in v0.0.20
Types ¶
type BindMount ¶
func NewBindMount ¶
type Container ¶
type Container struct {
Name string
Image string
Command []string
Args []string
Env []string
User string
SecurityOpt []string
MemoryLimitBytes int64
CPULimitCores float64
BindMounts []*BindMount
PortMapping *PortMapping
Hostname string
WorkingDir string
IPCMode string
Sound bool
// If true, the entrypoint of the image will be overridden. Only used for
// `diambra agent test`.
OverrideEntrypoint bool
}
type ContainerStatus ¶
type ContainerStatus struct {
ID string
PortMapping *PortMapping
Address string
}
type DockerRunner ¶
type DockerRunner struct {
log.Logger
*client.Client
TimeoutStop time.Duration
AutoRemove bool
// contains filtered or unexported fields
}
DockerRunner implements Runner
func NewDockerRunner ¶
func NewDockerRunner(logger log.Logger, autoRemove bool) (*DockerRunner, error)
func (*DockerRunner) Attach ¶
func (r *DockerRunner) Attach(id string) (io.WriteCloser, io.ReadCloser, error)
func (*DockerRunner) Build ¶ added in v0.0.20
func (r *DockerRunner) Build(path string, tag string) error
func (*DockerRunner) Login ¶ added in v0.0.20
func (r *DockerRunner) Login(username, password, serverAddress string)
func (*DockerRunner) Push ¶ added in v0.0.20
func (r *DockerRunner) Push(tag string) error
func (*DockerRunner) Start ¶
func (r *DockerRunner) Start(c *Container) (*ContainerStatus, error)
func (*DockerRunner) Stop ¶
func (r *DockerRunner) Stop(id string) error
func (*DockerRunner) StopAll ¶
func (r *DockerRunner) StopAll() error
type HijackedResponseReader ¶
type HijackedResponseReader struct {
log.Logger
types.HijackedResponse
}
func (*HijackedResponseReader) Close ¶
func (r *HijackedResponseReader) Close() error
type PortMapping ¶
func (*PortMapping) AddPortMapping ¶
func (pm *PortMapping) AddPortMapping(containerPort string, hostPort string, hostAddress string)
type Runner ¶
type Runner interface {
Pull(*Container, *os.File) error
Start(*Container) (*ContainerStatus, error)
LogLogs(id string, logger log.Logger) error
Stop(id string) error
StopAll() error
Attach(id string) (io.WriteCloser, io.ReadCloser, error)
Wait(id string) (int, error)
Build(path, tag string) error
Login(username, password, registry string)
Push(tag string) error
}
Click to show internal directories.
Click to hide internal directories.