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

Official Module

Cockroach Labs
We partner with software vendors to maintain and certify official modules.

Description

CockroachDB is an open-source, cloud-native, resilient, distributed SQL database.

Examples

Dependency:
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>cockroachdb</artifactId>
    <version>1.20.0</version>
    <scope>test</scope>
</dependency>
Usage:
var cockroach = new new CockroachContainer(DockerImageName.parse("cockroachdb/cockroach:v22.2.3"));
cockroach.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/cockroachdb
Usage:
cockroachdbContainer, err := cockroachdb.Run(ctx, "cockroachdb/cockroach:v22.2.3")
Dependency:
pip install testcontainers[cockroachdb]
Usage:
with CockroachDBContainer('cockroachdb/cockroach:v24.1.1') as crdb:
  engine = sqlalchemy.create_engine(crdb.get_connection_url())
  with engine.begin() as connection:
    result = connection.execute(sqlalchemy.text("select version()"))
    version, = result.fetchone()