Description
Elasticsearch is a search and analytics engine based on Apache Lucene. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.Examples
Dependency:
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.20.0</version>
<scope>test</scope>
</dependency>
Usage:
var elastic = new ElasticsearchContainer(DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch:7.9.2"));
elastic.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/elasticsearch
Usage:
elasticsearchContainer, err := elasticsearch.Run(ctx, "docker.elastic.co/elasticsearch/elasticsearch:8.9.0")
Dependency:
dotnet add package Testcontainers.Elasticsearch --version 3.9.0
Usage:
var elasticsearchContainer = new ElasticsearchBuilder()
.WithImage("elasticsearch:8.6.1")
.Build();
await elasticsearchContainer.StartAsync();
Dependency:
npm install @testcontainers/elasticsearch --save-dev
Usage:
const container = await new ElasticsearchContainer().start();
Dependency:
pip install testcontainers[elasticsearch]
Usage:
with ElasticSearchContainer(f'elasticsearch:8.3.3', mem_limit='3G') as es:
resp = urllib.request.urlopen(es.get_url())