dockerutil

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDocker

func CheckDocker() error

CheckDocker verifies that the docker CLI is available on the PATH.

func PullImage

func PullImage(image string, output chan<- string) error

PullImage pulls a Docker image via the Docker Engine API, streaming progress to the output channel as human-readable lines like "Downloading 120.5 MB / 557.3 MB".

func RemoveContainer

func RemoveContainer(name string) error

RemoveContainer force-removes a container by name, ignoring "not found" errors.

func RunContainer

func RunContainer(name, image, dataDir string, detach bool) error

RunContainer starts a container with the given name, image, and data directory bind mount. If detach is true, the container runs in the background (output suppressed). If foreground, stdout/stderr/stdin are attached to the terminal.

func StopContainer

func StopContainer(name string) error

StopContainer gracefully stops a container by name using SIGTERM, then removes it. Returns nil if the container does not exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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