testcontainers / testcontainers/testcontainers-java
Cannot use against local image Ids
未关闭
还没有人认领这个 Issue。
resolution/acknowledged
type/feature
- 主要语言
- Java
- 星标
- 8.7k
- 派生
- 1.9k
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 9
描述
For example, if using the output of --iidfile then the image is attempted to be fetched instead of using the existing local image Id:
Caused by: org.testcontainers.containers.ContainerFetchException: Retry limit reached while trying to pull image: sha256:8cf620617c6203b24af7c5bf15a7212386c27ad008fc4c6ff7e37a1bf0a3cdd2
at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:91)
at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:25)
at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:20)
at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:27)
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:839)
... 55 more
Caused by: com.github.dockerjava.api.exception.NotFoundException: {"message":"pull access denied for sha256, repository does not exist or may require 'docker login'"}
docker run --it --rm sha256:8cf620617c6203b24af7c5bf15a7212386c27ad008fc4c6ff7e37a1bf0a3cdd2 works as expected.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 org.testcontainers.images.RemoteDockerImage 开始,尤其是 resolve,并使用 Docker 的 --iidfile 输出中的本地镜像 ID 重现报告的案例。确认 docker run 接受 sha256 镜像 ID,然后验证完成后的行为会使用现有的本地镜像,而不是尝试从 registry 拉取。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- docker, java
- 领域
- devops, testing
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100