Skip to content

Garnet

Garnet is a high-performance, Redis-compatible in-memory data store.

The Testcontainers Redis module is compatible with the Garnet container image. You can use the existing Testcontainers.Redis package without requiring a separate Garnet module.

Note

If Garnet introduces features or configuration options that require dedicated support in the future, we can introduce a separate module at that time.

Usage

Add the Redis module:

NuGet
1
dotnet add package Testcontainers.Redis

Start a Garnet container using the Redis builder:

1
2
var garnetContainer = new RedisBuilder("ghcr.io/microsoft/garnet:1.0.99").Build();
await garnetContainer.StartAsync();

Tip

For the complete source code of this example and additional information, please refer to our test projects.