testcontainers / testcontainers/testcontainers-java

Ability to specify the image pull policy in the DockerComposeContainer

Open
#4,601 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi!
I suggest adding the ability to specify the image pull policy to DockerComposeContainer. There is currently no way to tell DockerComposeContainer to pull the latest version of images from the remote repository when the image is already present in the local repository.

I believe that we can follow the analogy with the one implemented in org.testcontainers.containers.GenericContainer and add the method withImagePullPolicy to the DockerComposeContainer. In this case, the pull policy will be applied to all images that are found in docker-compose config files.
An alternative option would be, for example, specifying the image pull policy for individual services.

I am ready to implement this feature and await feedback.

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 DockerComposeContainer and compare GenericContainer's image-pull-policy implementation and API. Trace how images from Docker Compose configuration are handled, then define and test the requested policy behavior for those images, including whether it applies globally or per service.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.