TestcontainerEx.Connection.Resolver (testcontainer_ex v0.7.0)

Copy Markdown View Source

Orchestrates host resolution strategies.

When an explicit engine is requested, only that strategy is tried. When :auto (default), tries all strategies in priority order until one succeeds.

Returns {:ok, url} or {:error, reasons}.

Summary

Functions

Resolves the container engine host URL.

Types

engine()

@type engine() :: :auto | :docker | :podman | :colima | :minikube | :apple_container

Functions

resolve(options \\ [])

@spec resolve(keyword()) :: {:ok, String.t()} | {:error, [term()]}

Resolves the container engine host URL.

Options

  • :engine — explicitly select an engine:
    • :auto (default) — try all strategies in priority order
    • :docker — Docker Desktop, Colima, or socket-based Docker
    • :podman — Podman socket or container env
    • :colima — Colima only
    • :minikube — Minikube only
    • :apple_container — Apple Container only

The engine can also be set via the CONTAINER_ENGINE environment variable (e.g. CONTAINER_ENGINE=docker). The explicit option takes precedence.