Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/update compose container #9871

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

fokion
Copy link
Contributor

@fokion fokion commented Jan 21, 2025

In the #9222 a user is specifying a property with the field name compose.container.image and the ComposeContainer when it creates the composeDelegate variable is always picking the 24.0.2 version of docker. The change that I am proposing is to use the TestcontainersConfiguration in order to parse the property compose.container.image if it exists otherwise continue as it was in the past. Updated the constructors based on the feedback.

@fokion fokion requested a review from a team as a code owner January 21, 2025 22:22
@fokion fokion force-pushed the feat/update-compose-container branch from 3ae5baa to 10d6485 Compare January 23, 2025 09:06
Copy link
Member

@eddumelendez eddumelendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. I've left some comments. Also adding proper docs and tests would be nice.

@@ -61,36 +62,74 @@ public class ComposeContainer extends FailureDetectingExternalResource implement

public static final String COMPOSE_EXECUTABLE = SystemUtils.IS_OS_WINDOWS ? "docker.exe" : "docker";

private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("docker:24.0.2");
private static final String DEFAULT_DOCKER_IMAGE = "docker:27.5.0";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not override default image.

Comment on lines 127 to 132
public static DockerImageName getDockerImageName() {
return DockerImageName.parse(
TestcontainersConfiguration
.getInstance()
.getEnvVarOrUserProperty("compose.container.image", DEFAULT_DOCKER_IMAGE)
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a deprecated way to do it and given we are offering a new constructor to set the image, this doesn't apply anymore.

@fokion fokion force-pushed the feat/update-compose-container branch from 45b2894 to 2dd3b3d Compare February 6, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants