testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.65k stars 250 forks source link

[Enhancement]: Make `ingest.geoip.downloader.enabled` environment of elastic container optional #1174

Open xzxzxc opened 1 month ago

xzxzxc commented 1 month ago

Problem

Not all elastic images are compatible with the ingest.geoip.downloader.enabled environment. We use a custom image which produces the following error

unknown setting [ingest.geoip.downloader.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

Solution

Add an option in the constructor of ElasticsearchContainer, or a separate method, to prevent setting the ingest.geoip.downloader.enabled environment.

Benefit

A broader range of custom elastic images will be supported.

Alternatives

For now, we use the following workaround

.WithEnvironment("ingest.geoip.downloader.enabled", "")

Would you like to help contributing this enhancement?

Yes