Documentation
¶
Overview ¶
Package docker provides helper methods for ChromeOS usage of Docker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerRunner ¶
type ContainerRunner struct {
// contains filtered or unexported fields
}
ContainerRunner runs Docker containers, handling authentication, mounting, etc.
func NewContainerRunner ¶
func NewContainerRunner(runner cmd.CommandRunner) *ContainerRunner
NewContainerRunner returns a ContainerRunner that uses runner to run `docker` commands and other required commands (such as authenticating with `gcloud`).
func (*ContainerRunner) RunContainer ¶
func (c *ContainerRunner) RunContainer( ctx context.Context, containerConfig *container.Config, hostConfig *container.HostConfig, containerImageInfo *api.ContainerImageInfo, runtimeOptions *RuntimeOptions, ) error
RunContainer runs a container with `docker run`.
type RuntimeOptions ¶
type RuntimeOptions struct { // If true, use `gcloud auth configure-docker` instead of `docker login` to // authenticate with the registry. Note that this is never run with sudo. UseConfigureDocker bool // If true, don't use sudo when running docker. Note this doesn't affect the // authentication commands. NoSudo bool // Writer to send stdout from the docker command to, nil is valid (stdout // isn't captured or printed). StdoutBuf io.Writer // Writer to send stderr from the docker command to, nil is valid (stderr // isn't captured or printed). StderrBuf io.Writer }
RuntimeOptions configures how docker and related auth commands are run.
Click to show internal directories.
Click to hide internal directories.