Skip to content

Modules

Modules are a great example of the capabilities of Testcontainers for .NET. Choose one of the pre-configurations below or find further examples in TestcontainersContainerTest as well as in the database or message broker tests to set up your test environment.

Module Container image
LocalStack localstack/localstack:1.2.0
Apache CouchDB couchdb:2.3.1
Azurite mcr.microsoft.com/azure-storage/azurite:3.18.0
Cosmos DB Linux Emulator mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
Couchbase couchbase:6.5.1
Elasticsearch elasticsearch:8.3.2
MariaDB mariadb:10.8
Microsoft SQL Server mcr.microsoft.com/mssql/server:2017-CU28-ubuntu-16.04
MongoDB mongo:5.0.6
MySQL mysql:8.0.28
Neo4j neo4j:4.4.11
Oracle Database gvenzl/oracle-xe:21-slim
PostgreSQL postgres:11.14
Redis redis:5.0.14
Apache Kafka confluentinc/cp-kafka:6.0.5
RabbitMQ rabbitmq:3.7.28

Due to a design flaw in the current module system, pre-configured containers must be configured through their corresponding extension method (WithDatabase or WithMessageBroker):

await new TestcontainersBuilder<PostgreSqlTestcontainer>()
  .WithDatabase(new PostgreSqlTestcontainerConfiguration())
  .Build()
  .StartAsync()
  .ConfigureAwait(false);