TestcontainerEx.Connection.Strategies.Dotenv (testcontainer_ex v0.6.0)

Copy Markdown View Source

Resolves the container engine host from a .env file in the project root.

Reads CONTAINER_ENGINE_HOST from .env (if present) so that developers can commit a project-local default without modifying their shell profile. Falls back to DOCKER_HOST for backward compatibility.

Only activates when neither CONTAINER_ENGINE_HOST nor DOCKER_HOST is already set in the environment, making this a fallback rather than an override.

The .env file uses simple KEY=VALUE syntax, one per line. Lines starting with # are treated as comments.