docker

package
v0.0.0-...-73ddf49 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package docker is the local-Docker backend: a runtime.Compute (per-sandbox network + the main toolchain container the supervisor runs in, delivered via `docker cp` + `docker exec`) and a runtime.Backing (the compose engine). cmd's buildRuntime dispatches to it for the `runtime: { docker: … }` block (and by default when a sandbox declares no runtime).

mdev never parses compose files: services are brought up by the compose engine and their routes discovered by inspecting the running containers (one "<service>-<port>" route per EXPOSEd port; see runtime.Routes).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForceCleanup

func ForceCleanup(ctx context.Context, sandbox string) error

ForceCleanup removes everything a sandbox may have left behind — its labeled containers, its compose-managed backing services, and its network. Best-effort and idempotent; used by the daemon's sandbox_down when no `mdev up` host process is tracked (e.g. after a daemon restart).

func New

func New(spec runtime.Spec, daemon runtime.Daemon, cfg Config) (runtime.Runner, error)

New builds the Docker runtime for spec. daemon supplies the token + admin address (the in-container supervisor reaches the host via host.docker.internal); cfg is this backend's typed config.

Types

type Config

type Config struct {
	Compose []string `yaml:"compose"` // backing-service compose files
}

Config is the docker backend's typed config (the `runtime: { docker: … }` block).

Jump to

Keyboard shortcuts

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