{"modulePath":"github.com/2lambda123/openshift-origin","version":"v3.8.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package run\n\nPackage runner contains a utility to run Docker containers\n\nCreate a RunHelper with NewRunHelper and then create new run instances with New()\n\n## Types\n\n```go\ntype RunHelper struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewRunHelper(dockerHelper *dockerhelper.Helper) *RunHelper\n```\n\n```go\nfunc (h *RunHelper) New() *Runner\n```\n\n```go\ntype Runner struct {\n\t// contains filtered or unexported fields\n}\n```\nRunner is a helper to run new containers on Docker\n\n```go\nfunc (h *Runner) Bind(binds ...string) *Runner\n```\nBind tells Docker to bind host dirs to container dirs\n\n```go\nfunc (h *Runner) Command(cmd ...string) *Runner\n```\nCommand sets the command to run\n\n```go\nfunc (h *Runner) Copy(contents map[string][]byte) *Runner\n```\n\n```go\nfunc (h *Runner) Create() (string, error)\n```\n\n```go\nfunc (h *Runner) DNS(address ...string) *Runner\n```\n\n```go\nfunc (h *Runner) DiscardContainer() *Runner\n```\nDiscardContainer if true will cause the container to be removed when done executing. Will be ignored in the case of Start\n\n```go\nfunc (h *Runner) Entrypoint(cmd ...string) *Runner\n```\nEntrypoint sets the entrypoint to use when running\n\n```go\nfunc (h *Runner) Env(env ...string) *Runner\n```\nEnv tells Docker to add environment variables to the container getting started\n\n```go\nfunc (h *Runner) HostNetwork() *Runner\n```\nHostNetwork tells Docker to run using the host's Network namespace\n\n```go\nfunc (h *Runner) HostPid() *Runner\n```\nHostPid tells Docker to run using the host's pid namespace\n\n```go\nfunc (h *Runner) Image(image string) *Runner\n```\nImage sets the image to run\n\n```go\nfunc (h *Runner) Name(name string) *Runner\n```\nName sets the name of the container to create\n\n```go\nfunc (h *Runner) Output() (string, string, int, error)\n```\nOutput starts the container, waits for it to finish and returns its output\n\n```go\nfunc (h *Runner) PortForward(local, remote int) *Runner\n```\n\n```go\nfunc (h *Runner) Privileged() *Runner\n```\nPrivileged tells Docker to run the container as privileged\n\n```go\nfunc (h *Runner) Run() (int, error)\n```\nRun executes the container and waits until it completes\n\n```go\nfunc (h *Runner) Start() (string, error)\n```\nStart starts the container as a daemon and returns\n\n```go\nfunc (h *Runner) User(user string) *Runner\n```\nUser sets the username or UID to use when running the container. Will be ignored if empty string\n\n","path":"github.com/2lambda123/openshift-origin/pkg/oc/bootstrap/docker/run","name":"run","synopsis":"Package runner contains a utility to run Docker containers","isRedistributable":true}
