[Bug]: Elasticsearch: Incorrectly detected OSS image
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
调研方向
从链接的 ElasticsearchContainer.java 中第 108-117 行附近的部分开始,检查使用 library/elasticsearch 别名时 image name 被分类为 OSS 的方式。使用 8.10.4 image 重现报告中的配置,并验证 container 不再以 OSS image 为由拒绝启用安全功能,同时保留兼容性警告行为。
由索引模型根据 Issue 内容生成。
描述
Module
Elasticsearch
Testcontainers version
1.19.8
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host Arch
amd64
Docker version
Client:
Version: 26.1.0-rd
API version: 1.44 (downgraded from 1.45)
Go version: go1.21.9
Git commit: cca8e72
Built: Tue Apr 23 16:26:59 2024
OS/Arch: windows/amd64
Context: default
Server:
Engine:
Version: 25.0.5
API version: 1.44 (minimum version 1.24)
Go version: go1.21.10
Git commit: e63daec8672d77ac0b2b5c262ef525c7cf17fd20
Built: Sun May 12 07:25:43 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.7.10
GitCommit: 4e1fe7492b9df85914c389d1f15a3ceedbb280ac
runc:
Version: 1.1.12
GitCommit: 51d5e94601ceffbbd85688df1c928ecccbfa4685
docker-init:
Version: 0.19.0
GitCommit:
What happened?
We are currently trying to use Azure Container registry (ACR) to serve as a pull through cache for Docker images. That one has quite some limitations (e.g.: https://github.com/Azure/acr/issues/599#issuecomment-1751689962), forcing us to configure the Elasticsearch Testcontainer like this (please note the library/ prefix):
elasticsearchContainer = new ElasticsearchContainer(
DockerImageName.parse("library/elasticsearch")
.asCompatibleSubstituteFor("docker.elastic.co/elasticsearch/elasticsearch")
.withTag("8.10.4")
)
This one fails, as it claims it tries to use the OSS version of Elasticsearch while activating a password, even though it is not true (it is not the OSS image...) + I override this anyway with asCompatibleSubstituteFor
Relevant log output
2024-07-05T13:50:43.285Z INFO 422 --- [dataview] [ main] ContainersSpringContextCustomizerFactory : Warming up the elastic database
2024-07-05T13:50:43.287Z WARN 422 --- [dataview] [ main] o.t.e.ElasticsearchContainer : library/elasticsearch is not supported anymore after 7.10.2. Please switch to docker.elastic.co/elasticsearch/elasticsearch
2024-07-05T13:50:43.332Z ERROR 422 --- [dataview] [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'de.mt.dataview.config.ElasticsearchTestContainer': You can not activate security on Elastic OSS Image. Please switch to the default distribution
Additional Information
Seems like the detection for isOss is could be improved - or maybe removed as it seems marked deprecated anyway...
- 主要语言
- Java
- 星标
- 8.8k
- 派生
- 2k
- 平均合并
- 5 天 21 小时
- 30 天内合并 PR
- 15
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testcontainers/testcontainers-java 的其他 Issue
-
[Bug]: withStartupTimeout() changes the startup timeout of all containers that use the default wait strategy可能已有人在做 @aymenjamaaoui 于 1 天前认领。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 64/100
testcontainers/testcontainers-java#12171 ·
维护者通常 1 天内回复
-
[Enhancement]: Document why singleton containers are required under Spring's test context caching可能已有人在做 @zakaullah075 于 95 天前认领。 未关闭type/enhancement
难度 1/5 1 小时以内 新手友好度 85/100
testcontainers/testcontainers-java#11967 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Cannot reuse Selenium BrowserWebDriverContainers under Linux可能已有人在做 @kdelay 于 116 天前认领。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 78/100
testcontainers/testcontainers-java#11941 ·
维护者通常 1 天内回复
-
[Bug]: DockerDesktopClientProviderStrategy is always applicable可能已有人在做 @seonwooj0810 于 165 天前认领。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 74/100
testcontainers/testcontainers-java#11829 · 1 条评论 ·
维护者通常 1 天内回复
-
[Enhancement]: cleanup document after removing junit4 support可能已有人在做 @SJvaca30 于 173 天前认领。 未关闭type/enhancement
难度 2/5 1-3 小时 新手友好度 65/100
testcontainers/testcontainers-java#11578 ·
维护者通常 1 天内回复
查看 testcontainers/testcontainers-java 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
SAP/ai-sdk-java#1206 ·
维护者通常 1 天内回复
-
enhancement good first issue insight-module
难度 2/5 1-3 小时 新手友好度 86/100
sdlc-pro/spring-lens#606 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
apache/cloudstack#14719 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
apache/maven-surefire#3605 ·
维护者通常 1 天内回复