feature request: expand "Customizing Image Pull Behavior" to include a "platform" override

未关闭
#9,908 11 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, java

调研方向

阅读“Customizing Image Pull Behavior”和“Image Pull Policy”部分,然后查看链接的 issue 以及已记录的 CreateContainerCmdModifier 方法。只有在就所提议的平台设置和行为达成一致,并完成实现、测试和文档编写后,该 issue 才算完成。

由索引模型根据 Issue 内容生成。

描述

In the "Customizing Image Pull Behavior" section:

https://java.testcontainers.org/features/configuration/#customizing-image-pull-behaviour

there is an ability to to specify the behavior of timeouts while pulling.

There is also "pull.policy" which is not documented here but only in another place (https://java.testcontainers.org/features/advanced_options/#image-pull-policy)

the idea is to add a "pull.platform" or "pull.default-platform" or something which will override the platform detected normally with the one given as a property.

The proposal, initially to provide a single value as an override, is amended to provide two settings. one of which is a list of platforms to attempt to use - say ["darwin/arm64", "linux/arm64", "linux/amd64"] - and another which is a boolean flag which says whether or not the first one is a strict requirement (if false - implicit last thing to try is the default behavior). if the flag is true, and the first parameter is not null, the image pull action fails if none of the archs are present.

and document it in this section.

pros:

satisfy the needs described here - https://github.com/testcontainers/testcontainers-java/issues/3810#issuecomment-1876900016

cons:

potentially a satisfactory solution can be contained in user code as here - https://java.testcontainers.org/features/advanced_options/#using-createcontainercmdmodifier

conclusion:

purpose of this issue is to determine whether or not this addition is welcome as it seems to solve a need based on the other thread (linked in pros section)

主要语言
Java
星标
8.8k
派生
2k
平均合并
2 天 1 小时
30 天内合并 PR
11

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

testcontainers/testcontainers-java 的其他 Issue

查看 testcontainers/testcontainers-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。