Documentation ¶
Overview ¶
Package runner contains a utility to run Docker containers
Create a RunHelper with NewRunHelper and then create new run instances with New()
Index ¶
- type RunHelper
- type Runner
- func (h *Runner) Bind(binds ...string) *Runner
- func (h *Runner) Command(cmd ...string) *Runner
- func (h *Runner) Copy(contents map[string][]byte) *Runner
- func (h *Runner) Create() (string, error)
- func (h *Runner) DNS(address ...string) *Runner
- func (h *Runner) DiscardContainer() *Runner
- func (h *Runner) Entrypoint(cmd ...string) *Runner
- func (h *Runner) Env(env ...string) *Runner
- func (h *Runner) HostNetwork() *Runner
- func (h *Runner) HostPid() *Runner
- func (h *Runner) Image(image string) *Runner
- func (h *Runner) Name(name string) *Runner
- func (h *Runner) Output() (string, string, string, int, error)
- func (h *Runner) Privileged() *Runner
- func (h *Runner) Run() (string, int, error)
- func (h *Runner) SaveContainerLogs(name, logdir string) *Runner
- func (h *Runner) Start() (string, error)
- func (h *Runner) User(user string) *Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunHelper ¶
type RunHelper struct {
// contains filtered or unexported fields
}
func NewRunHelper ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is a helper to run new containers on Docker
func (*Runner) DiscardContainer ¶
DiscardContainer if true will cause the container to be removed when done executing. Will be ignored in the case of Start
func (*Runner) Entrypoint ¶
Entrypoint sets the entrypoint to use when running
func (*Runner) HostNetwork ¶
HostNetwork tells Docker to run using the host's Network namespace
func (*Runner) Privileged ¶
Privileged tells Docker to run the container as privileged
func (*Runner) SaveContainerLogs ¶
SaveContainerLogs causes the helper to store the container stdout and stderr into a file
Click to show internal directories.
Click to hide internal directories.