testcontainers / testcontainers/testcontainers-java

Allow default image customization without tags

Open
#2,100 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I would like the ability to customize the default images used by testcontainers but NOT specify the specific tags used. Therefore, allowing the default tags to continue to be specified by testcontainers.

In my corporate environment, we have an artifactory instance that caches several public repositories (docker.io, quay.io, etc). Our builds generally pull from these caches instead of the public repositories directly.

I want to tell testcontainers to use our caches instead of the public repositories, but I don't want to tell testcontainers which specific tag I want to use. I want to rely on the default tags specified in testcontainers, so I don't have to constantly keep updating the tags used whenever I upgrade testcontainers of various builds.

Currently the default images used by testcontainers can be customized by specifying properties like this:

tinyimage.container.image = alpine:3.5
vncrecorder.container.image = quay.io/testcontainers/vnc-recorder:1.1.0
ambassador.container.image = richnorth/ambassador:latest
compose.container.image = docker/compose:1.8.0
kafka.container.image = confluentinc/cp-kafka
localstack.container.image = localstack/localstack
ryuk.container.image = quay.io/testcontainers/ryuk:0.2.3

However, I would like to be able to specify default images using something like this:

tinyimage.container.image.prefix = docker-io.company.com/alpine
vncrecorder.container.image.prefix = quay-io.company.com/testcontainers/vnc-recorder
ambassador.container.image.prefix = docker-io.company.com/richnorth/ambassador
compose.container.image.prefix = docker-io.company.com/docker/compose
kafka.container.image.prefix = docker-io.company.com/confluentinc/cp-kafka
localstack.container.image.prefix = docker-io.company.com/localstack/localstack
ryuk.container.image.prefix = quay-io.company.com/testcontainers/ryuk

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

Start with docs/features/configuration.md and trace how the documented image properties are resolved for the default images. Add support for image prefixes while preserving the default tags, and verify that the existing full-image overrides continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
39/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.