Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInteractive ¶
BuildInteractive runs a build command with inherited stdout/stderr.
func BuildQuiet ¶ added in v0.1.1
BuildQuiet runs a build command capturing all output. Returns combined output and error. Use this for non-verbose builds with a spinner.
func ExecInteractive ¶
ExecInteractive runs a command with inherited stdio (for interactive use).
func IsAvailable ¶
IsAvailable checks if any container runtime is available and operational.
Types ¶
type Runtime ¶
type Runtime interface {
Name() string
Build(ctx context.Context, args []string) error
Run(ctx context.Context, args []string) (int, error)
Exec(ctx context.Context, ctr string, args []string) error
ImageExists(image string) bool
ImageInspect(image, format string) (string, error)
ImageList(filter string) ([]string, error)
ImageRemove(image string) error
PS(filter, format string) ([]string, error)
Stop(container string) error
Remove(container string) error
NetworkCreate(name string, internal bool) error
NetworkExists(name string) bool
NetworkConnect(network, container string) error
NetworkInspect(name, format string) (string, error)
IsRootless() bool
}
Runtime is the container runtime interface.
func Detect ¶
func Detect() Runtime
Detect finds and returns a container runtime (podman preferred, docker fallback). Returns nil if none found.
func MustDetect ¶
func MustDetect() Runtime
MustDetect returns a runtime or panics with an error message.
Click to show internal directories.
Click to hide internal directories.