TestcontainerEx.Docker.Engine (testcontainer_ex v0.1.0)

Copy Markdown View Source

Detects which container engine is in use: Docker, Podman, or minikube.

Detection is cached after the first call via :persistent_term.

Summary

Functions

Detects the container engine type.

Returns true when running in a minikube environment.

Returns true when running with Podman.

Functions

detect()

@spec detect() :: :docker | :podman | :minikube

Detects the container engine type.

Returns one of:

  • :podman — if CONTAINER_HOST is set or the daemon identifies as Podman
  • :minikube — if minikube env vars are set or DOCKER_HOST matches minikube subnets
  • :docker — default fallback

Results are cached after the first call.

minikube?()

@spec minikube?() :: boolean()

Returns true when running in a minikube environment.

podman?()

@spec podman?() :: boolean()

Returns true when running with Podman.