🚨 AtomicJar is now part of Docker 🐋! Read the blog

Community Module

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

Dependency:
<dependency>
    <groupId>com.redis</groupId>
    <artifactId>testcontainers-redis</artifactId>
    <version>2.2.2</version>
    <scope>test</scope>
</dependency>
Usage:
var redis = new RedisContainer(DockerImageName.parse("redis:6.2.6"));
redis.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/redis
Usage:
redisContainer, err := redis.Run(ctx, "redis:6")
Dependency:
dotnet add package Testcontainers.Redis --version 3.9.0
Usage:
var redisContainer = new RedisBuilder()
  .WithImage("redis:7.0")
  .Build();
await redisContainer.StartAsync();
Dependency:
npm install @testcontainers/redis --save-dev
Usage:
const container = await new RedisContainer().start();
Dependency:
pip install testcontainers[redis]
Usage:
with RedisContainer() as redis_container:
    redis_client = redis_container.get_client()