GenServer that manages the TestcontainerEx lifecycle.
State holds the connection, session metadata, and tracked resources (containers, networks, compose environments) for cleanup on termination.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns true if the server has a working Docker connection.
Returns the engine currently in use by the given server.
Reconnects the server to a different container engine at runtime.
Stops the GenServer.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns true if the server has a working Docker connection.
Returns the engine currently in use by the given server.
Returns an engine atom (:docker, :podman, :colima, :minikube,
:apple_container) or :auto if no explicit engine was selected.
Reconnects the server to a different container engine at runtime.
This stops all tracked containers, tears down the existing connection, and re-initializes with the specified engine.
Options
:engine— the engine to switch to (e.g.,:docker,:podman,:colima,:minikube,:apple_container, or:autofor auto-detection)
Examples
# Switch to Podman
TestcontainerEx.reconnect(engine: :podman)
# Switch back to auto-detection
TestcontainerEx.reconnect(engine: :auto)
Stops the GenServer.