🚀 Our inaugural State of Local Development and Testing report is live! Explore insights & best practices now

Documentation

Java Go .NET

Community Modules

These modules are maintained by the community, outside of the Testcontainers project.

Description

Redis is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indices.

Examples

var redis = new RedisContainer(DockerImageName.parse("redis:6.2.6"));
redis.start();
redisContainer, err := redis.RunContainer(ctx, testcontainers.WithImage("redis:6"))
var redisContainer = new RedisBuilder()
  .WithImage("redis:7.0")
  .Build();
await redisContainer.StartAsync();