Documentation
¶
Overview ¶
Package run assembles and executes the `docker run` command for a preset.
Index ¶
- func Assemble(name string, p config.Preset, opts Options, image string, extraArgs []string) []string
- func EnsureHostDirs(missing []string, in io.Reader, out io.Writer) error
- func Exec(args []string) error
- func MissingHostDirs(p config.Preset, opts Options) []string
- func Print(args []string)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assemble ¶
func Assemble(name string, p config.Preset, opts Options, image string, extraArgs []string) []string
Assemble builds the docker run command for a preset + options. name is used for the container name. image is the image ref to run (either preset.Image or a built layer tag). extraArgs are appended after the entrypoint.
func EnsureHostDirs ¶
EnsureHostDirs prompts to create missing host-side mount directories. Without a TTY it skips host-side creation and leaves missing paths alone.
func MissingHostDirs ¶
MissingHostDirs returns the host-side mount paths that do not yet exist. Extra mounts from CLI are included. Paths with leading ~ are expanded.
Types ¶
type Options ¶
type Options struct {
ExtraMounts []string
ExtraEnv map[string]string
ExtraPorts []string
Entrypoint string // overrides preset.Entrypoint if non-empty
User string // overrides preset.User if non-empty
Home string // overrides preset.Home if non-empty
ExtraLayers map[string][]string
TTY *bool // when set, overrides stdin-based TTY detection
}
Options are fields that can be supplied from CLI to override or augment a preset.