Skip to content

[Enhancement]: Allow overriding ryuk image to utilize custom container registry #10373

@pPanda-beta

Description

@pPanda-beta

Module

Core

Proposal

Right now the RYUK container image is pulled from public docker hub. People may fall in love with the resource reaper implementation and dont want to duplicate the entire code just for the sake of following two lines.

private final RyukContainer ryukContainer = new RyukContainer();

I personally would love to keep using ryuk based resource reaper coming directly from the library, instead of the duplicating the source code and keep it in sync with the library.
In many organizations public docker images may not be allowed. A certain level of security and compliance checks must be done and images should only be kept in private registry. All test codes can only pull images from this private registry which will cause the problem since ryuk image is pointing to public registry.

If we allow overriding this, or at least follow dependency injection and logicless constructors for the classes

Workaround

Hack 1

Ask all teammates to update their local docker daemon registry mirrors for the organization's private artifactory.

Hack 2

Add a test setup code which will pull the testcontainers/ryuk:...sync_with_library_version... from the private registry and tag that properly in local docker daemon.
eg. docker java client sample code:

final var  tag = "0.12.0";
dockerClient.pullImageCmd("testcontainers/ryuk:" + tag)
    .start()
    .awaitCompletion();

final var response = dockerClient.inspectImageCmd("testcontainers/ryuk:" + tag)
    .exec();
dockerClient.tagImageCmd(response.getId(), "highly-secure.artifactory.my-employer.io/" + "testcontainers/ryuk", tag).exec();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions