Detects which container engine is in use: Docker, Podman, minikube, or Apple Container.
Detection is cached after the first call via :persistent_term.
Precedence
CONTAINER_ENGINEenv var — explicit selection (docker,podman,colima,minikube,apple_container). When set, auto-detection is skipped entirely.CONTAINER_ENGINE_HOST/CONTAINER_HOSTenv vars — if the URL containspodmanor matches minikube subnets, the engine is inferred from the URL.MINIKUBE_ACTIVE_DOCKERD/MINIKUBE_PROFILEenv vars.- Apple Container — only when the
containerbinary exists, the service reports "running", and the API socket exists. - Podman ping — HTTP ping to the daemon checking for a Podman header.
- Default —
:docker.
Summary
Functions
Returns true when running with Apple Container.
Detects the container engine type.
Returns true when running in a minikube environment.
Returns true when running with Podman.
Functions
@spec apple_container?() :: boolean()
Returns true when running with Apple Container.
@spec detect() :: :docker | :podman | :minikube | :apple_container
Detects the container engine type.
Returns one of:
:apple_container— Apple Container runtime:podman— Podman:minikube— Minikube:docker— Docker (default)
Results are cached after the first call.
@spec minikube?() :: boolean()
Returns true when running in a minikube environment.
@spec podman?() :: boolean()
Returns true when running with Podman.