Documentation
¶
Index ¶
- func EnsureImage(ctx context.Context, cli *client.Client, imageRef string) error
- func Exec(ctx context.Context, cli *client.Client, req ExecRequest) error
- func NewClient(ctx context.Context, configuredHost string) (*client.Client, string, error)
- func RunContainer(ctx context.Context, cli *client.Client, req RunRequest) error
- type ExecRequest
- type RunRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureImage ¶
EnsureImage pulls imageRef when it is not already present on the daemon.
func NewClient ¶
NewClient resolves a reachable Docker-compatible daemon and returns a client configured for it.
func RunContainer ¶
RunContainer runs a short-lived helper container and removes it afterwards. On failure it includes captured container output in the returned error.
Types ¶
type ExecRequest ¶ added in v0.3.2
ExecRequest describes a command execution inside a running container.
type RunRequest ¶ added in v0.3.2
type RunRequest struct {
Config *container.Config
HostConfig *container.HostConfig
NetworkConfig *network.NetworkingConfig
Name string
Stdin io.Reader
}
RunRequest describes a short-lived helper container execution.
Click to show internal directories.
Click to hide internal directories.