Skip to content

Added support for the --target parameter in the docker build phase#1908

Merged
rohanKanojia merged 2 commits intofabric8io:masterfrom
jacob-netguardians:feature/support-for-target-parameter
Apr 1, 2026
Merged

Added support for the --target parameter in the docker build phase#1908
rohanKanojia merged 2 commits intofabric8io:masterfrom
jacob-netguardians:feature/support-for-target-parameter

Conversation

@jacob-netguardians
Copy link
Copy Markdown
Contributor

Added support for the --target parameter in the docker build phase (also with buildx)

@rohanKanojia
Copy link
Copy Markdown
Member

rohanKanojia commented Mar 25, 2026

@jacob-netguardians : Could you please rebase against main branch?

@jacob-netguardians
Copy link
Copy Markdown
Contributor Author

@rohanKanojia Sure thing. Done.

…d without buildx) phase

Signed-off-by: Jacob Deker <deker@netguardians.ch>
@jacob-netguardians jacob-netguardians force-pushed the feature/support-for-target-parameter branch from 356a22a to da13d35 Compare March 25, 2026 06:02
@rohanKanojia
Copy link
Copy Markdown
Member

rohanKanojia commented Mar 27, 2026

@jacob-netguardians : Thanks a lot for this! Do you think it's possible to add an integration test for this feature? There are several projects in it/ folder you just need to create similar project that uses this functionality.

Tests cover both the regular docker build and buildx code paths.
Each test builds a multi-stage Dockerfile with --target=base, starts
the resulting container, and asserts it outputs "base" (not "final"),
confirming the target stage was respected.
@jacob-netguardians
Copy link
Copy Markdown
Contributor Author

@rohanKanojia I just pushed two new integration tests (one for plain build, the other for buildx). Should I merge the two commits of the branch into one? Do you see anything missing?

@sonarqubecloud
Copy link
Copy Markdown

@rohanKanojia rohanKanojia merged commit 98b3421 into fabric8io:master Apr 1, 2026
25 of 26 checks passed
@jacob-netguardians jacob-netguardians deleted the feature/support-for-target-parameter branch April 1, 2026 05:39
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.

2 participants