testcontainers / testcontainers/testcontainers-java

TC tries to pull the image if dockerfile build fails

Open
#4,450 0 comments 0 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

I try to create an image on the fly with dockerfile, but when the build of the image fails, testcontainer try to pull the image from Internet.
is this desired behavior?
method RemoteDockerImage.resolve is called

dockerClient
                    .pullImageCmd(imageName.getUnversionedPart())
                    .withTag(imageName.getVersionPart())
                    .exec(new TimeLimitedLoggedPullImageResultCallback(logger))
                    .awaitCompletion();

TC version 1.15.1

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 at RemoteDockerImage.resolve and trace the pullImageCmd call shown in the issue. Determine whether a failed Dockerfile image build should trigger an image pull, then check the existing Testcontainers image-resolution tests for a suitable regression case. Done means the behavior is explicitly defined and the failed-build path matches it.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.