Runs Docker-dependent tests with automatic Ryuk setup and teardown.
This task handles the full lifecycle:
- Ensures Docker is available (starts Colima if needed)
- Starts a Ryuk reaper container for automatic test container cleanup
- Runs the requested tests (including :needs_dock tests)
- Stops Ryuk and cleans up on completion
Usage
# Run all tests including Docker-dependent ones
mix testcontainer_ex.test
# Run only Docker-dependent tests
mix testcontainer_ex.test --only needs_dock
# Run a specific test file
mix testcontainer_ex.test test/container/postgres_container_test.exs
# Run with a specific tag
mix testcontainer_ex.test --include needs_dock --exclude dood_limitation
# Only set up Ryuk (don't run tests)
mix testcontainer_ex.test --setup-only
# Tear down Ryuk and clean up
mix testcontainer_ex.test --teardownOptions
--setup-only Start Ryuk and exit (don't run tests)
--teardown Stop Ryuk and clean up test containers
--only TAG Run only tests with this tag (can be repeated)
--include TAG Include tests with this tag (passed to mix test)
--exclude TAG Exclude tests with this tag (passed to mix test)Environment variables
RYUK_IMAGE Ryuk image (default: testcontainers/ryuk:0.14.0)
RYUK_PORT Host port for Ryuk (default: auto)
TEST_TIMEOUT Timeout in ms (default: 300000)