Skip to content

[Enhancement]: Add support for image name substitution for all registry (not only DockerHub) #1705

Description

@scrocquesel-ml150

Problem

Big company often have an a mirroring cache (jfrog artifactory, azure container registry cache, ...) for many image hub (quay, gcp, mcr, ...). The current implementation address only the docker hub.

Solution

Having a solution similar to java ImageNameSubstitutor with an interface IImageNameSubstitutor that would allow to change a IDockerImage. A default implementation could replace the current behavior of Prefixing docker hub image when TestcontainersSettings.HubImageNamePrefix is set.

The strategy should be configurable.

It seems there was a first implementation for this issue #466 that seems to do just that. Unfortunately, the code was simplified too much to allow extensibility.

Benefit

Developper or/and CI/CD can run tests with testcontainer when the company block traffic to public registries and offer a mirror proxy.

Alternatives

Configure the image name manually with the good prefix. cons: it make the code dependent on where it runs or less idiomatic if use sort of extension method.

Would you like to help contributing this enhancement?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions