testcontainers / testcontainers/testcontainers-java

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

Open
#9,908 11 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the “Customizing Image Pull Behavior” and “Image Pull Policy” sections, then review the linked issue and the documented CreateContainerCmdModifier approach. The issue is complete only after the proposed platform settings and behavior are agreed, implemented, tested, and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.