Documentation
¶
Index ¶
- func ComposeCommand() []string
- func CopyFile(src, dst string) error
- func CopyNonEmptyContents(src, dst string) error
- type Executor
- func (e *Executor) Build(imageName, context string, extraArgs ...string) error
- func (e *Executor) CheckAvailability() error
- func (e *Executor) CopyFromContainer(containerID, containerPath, localPath string) error
- func (e *Executor) CreateContainer(imageRef string) (string, error)
- func (e *Executor) ImageExistsLocally(imageRef string) bool
- func (e *Executor) Pull(imageRef string) error
- func (e *Executor) Push(imageName string) error
- func (e *Executor) RemoveContainer(containerID string) error
- func (e *Executor) Run(args ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeCommand ¶
func ComposeCommand() []string
ComposeCommand returns the docker compose invocation (docker compose vs docker-compose).
func CopyFile ¶ added in v0.2.0
CopyFile copies a single file from src to dst, preserving permissions.
func CopyNonEmptyContents ¶ added in v0.2.0
CopyNonEmptyContents recursively copies only non-empty files and directories from a Docker container extraction, skipping system directories that Docker creates.
Types ¶
type Executor ¶
Executor wraps docker CLI operations with a working directory and verbosity.
func NewExecutor ¶
NewExecutor returns a configured docker executor.
func (*Executor) Build ¶
Build runs docker build with the supplied tag, context, and additional args.
func (*Executor) CheckAvailability ¶
CheckAvailability ensures docker CLI and daemon are reachable.
func (*Executor) CopyFromContainer ¶ added in v0.2.0
CopyFromContainer copies files from a container path to a local path. TODO: Extend Run to support quiet mode so this can use e.Run.
func (*Executor) CreateContainer ¶ added in v0.2.0
CreateContainer creates a container from an image without starting it and returns the container ID. It tries with an entrypoint override first, then falls back for minimal images without a shell. TODO: Extend Run to support capturing output so this can use e.Run.
func (*Executor) ImageExistsLocally ¶ added in v0.2.0
ImageExistsLocally checks if an image exists in the local Docker cache. TODO: Extend Run to support quiet mode so this can use e.Run.
func (*Executor) RemoveContainer ¶ added in v0.2.0
RemoveContainer removes a container by ID. TODO: Extend Run to support quiet mode so this can use e.Run.