Skip to content

resolves build args in FROM statements when using withDockerfile - #3922

Closed
jarebudev wants to merge 1 commit into
testcontainers:mainfrom
jarebudev:3238_use_build_args_in_prefetch
Closed

resolves build args in FROM statements when using withDockerfile#3922
jarebudev wants to merge 1 commit into
testcontainers:mainfrom
jarebudev:3238_use_build_args_in_prefetch

Conversation

@jarebudev

Copy link
Copy Markdown

resolves #3238

Optional<String> imageBuildArg = buildArgs.keySet()
.stream()
.filter(arg -> imageName.contains(arg))
.findFirst();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will only resolve a single match per FROM statement, right?
It also doesn't resolve the simple $VARIABLE pattern.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yep good spot, it would need to check more than one - could well have multiple args for a image depending on how fine grained your need is

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Also just seen your PR - I had been busy working on other projects and had forgot about this! I saw the notifications a few days ago so was going to see what was needed.
But happy for this to be closed in favour of your PR :)

@eddumelendez

Copy link
Copy Markdown
Member

Closing in favor of #6119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to pre-fetch an image when using build-args in FROM

3 participants