docker

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(cfg Config) sandboxpkg.Factory

NewFactory returns a Factory backed by a Docker container-per-session strategy.

func Preflight

func Preflight(ctx context.Context, cfg PreflightConfig) error

Preflight checks daemon reachability and image availability. A missing image is pulled automatically; the caller is expected to have built or published the image ahead of time for dev builds (the pull will fail with a registry error in that case).

Types

type Config

type Config struct {
	// Image is the container image to use. Required.
	Image string

	// ContainerPathPrefix / HostPathPrefix enable path alignment when anna
	// runs inside a container and talks to the daemon on the host (DooD).
	// Both fields are filled by applyDooDDefaults in the runner; callers
	// outside that path should leave them empty.
	ContainerPathPrefix string
	HostPathPrefix      string
}

Config configures the docker sandbox factory. All fields are populated by the runner glue layer — there are no user-facing knobs. The image is version-locked to the anna binary (via internal/config.SandboxDockerImage) and the path-prefix fields are auto-derived from ANNA_HOME_HOST when anna runs inside a container (see internal/agent/runner/sandbox_dood.go).

func (Config) TranslateToDaemonPath

func (c Config) TranslateToDaemonPath(path string) string

TranslateToDaemonPath rewrites an anna-view absolute path into the path the daemon will use as a bind-mount source. When prefix translation is not configured, the input is returned unchanged.

type PreflightConfig

type PreflightConfig struct {
	AnnaHome string
	Docker   Config
}

PreflightConfig configures a Preflight check.

Directories

Path Synopsis
Package dockerclient wraps the moby Go SDK (github.com/moby/moby/client) to manage sandbox containers for the docker sandbox backend.
Package dockerclient wraps the moby Go SDK (github.com/moby/moby/client) to manage sandbox containers for the docker sandbox backend.

Jump to

Keyboard shortcuts

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