Skip to content

feat(assembly): add Docker image build support via Maven profile (#1701)#1757

Merged
jbonofre merged 4 commits intoapache:mainfrom
jbonofre:gh-1701
Mar 13, 2026
Merged

feat(assembly): add Docker image build support via Maven profile (#1701)#1757
jbonofre merged 4 commits intoapache:mainfrom
jbonofre:gh-1701

Conversation

@jbonofre
Copy link
Member

This closes #1701

@jbonofre jbonofre requested a review from jeanouii March 12, 2026 05:36
jeanouii
jeanouii previously approved these changes Mar 12, 2026
Copy link
Contributor

@jeanouii jeanouii left a comment

Choose a reason for hiding this comment

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

LGTM

Small comments regarding the plugin versions and the goal=push for the profile.
Wondering if it's meant to replace the previous script and therefor if we should have the script deleted along side these changes to address the issue.
The dockerfile is out side this PR scope, but it would be great to pass in the Java version instead of having it hard coded (so we can use 17/21 or 25).
In terms of versioning, we probably also need latest to be created and have the git tag somewhere.

High level thoughts. hopefully it helps

assembly/pom.xml Outdated
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.45.1</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

We use the version twice. Not a blocker, but would be better to extract it and reuse it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also do we need goal -> push?
The docker images are built locally but never pushed, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need the push for buildx to be able to do multi-platform images.

That's the different between "local" (building the Docker image for the local host platform) and the "push" that actually do multi-platforms image (linux/amd64 and linux/arm64).

Good point for the plugin version, I will create a property to avoid the duplicate.

@jbonofre
Copy link
Member Author

  1. The previous build.sh is not used anymore. I kept for "transition" purpose but I'm fine to delete it (to avoid confusion).
  2. Good point about the Java version, let me improve this.
  3. Let me create the latest alias too.

Thanks @jeanouii !

… properties

Move docker-maven-plugin version and Java version to parent pom properties,
parameterize the Dockerfile base image JDK version, and remove the unused
build.sh script now superseded by Maven profiles. (apache#1701)
@jbonofre
Copy link
Member Author

@jeanouii do you mind to do a new pass ? I think I addressed your comments.

@jeanouii
Copy link
Contributor

I think we can merge.

Look good.
We can improve and have latest when necessary and see if we need or not the goal. It was there in the script before that's why I raised the point.

I'll approve the PR

@jbonofre jbonofre merged commit c4a2a80 into apache:main Mar 13, 2026
19 of 20 checks passed
@jbonofre jbonofre deleted the gh-1701 branch March 13, 2026 17:58
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.

Create docker image as part of the build

2 participants