run

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package run assembles and executes the `docker run` command for a preset.

Index

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

func EnsureHostDirs(missing []string, in io.Reader, out io.Writer) error

EnsureHostDirs prompts to create missing host-side mount directories. Without a TTY it skips host-side creation and leaves missing paths alone.

func Exec

func Exec(args []string) error

Exec runs docker with args, replacing the current process (best-effort).

func MissingHostDirs

func MissingHostDirs(p config.Preset, opts Options) []string

MissingHostDirs returns the host-side mount paths that do not yet exist. Extra mounts from CLI are included. Paths with leading ~ are expanded.

func Print

func Print(args []string)

Print writes the docker command that would be executed.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL