Skip to content

Conversation

@jacobsalway
Copy link
Contributor

@jacobsalway jacobsalway commented Mar 15, 2025

What changes were proposed in this pull request?

  • Switch to Azul JRE to save ~100 megabytes on the final runtime image
  • Add a Buildkit cache mount for the Gradle cache to speed up local Docker builds during development

Why are the changes needed?

The image is currently quite large at ~500 megabytes

Does this PR introduce any user-facing change?

No

How was this patch tested?

Tested locally

Was this patch authored or co-authored using generative AI tooling?

No

@jacobsalway jacobsalway changed the title Use JRE to reduce size of Docker image [SPARK-51520][K8S] Use JRE to reduce size of Docker image Mar 15, 2025
@jacobsalway jacobsalway force-pushed the use-jre-to-reduce-docker-image-size branch from 7d0fd3a to 0fea1be Compare March 15, 2025 10:15
@jacobsalway jacobsalway marked this pull request as ready for review March 15, 2025 10:15
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Thank you for opening a PR, @jacobsalway .


# Packaging
shadow-jar-plugin = "8.1.1"
shadow-jar-plugin = "8.3.6"
Copy link
Member

Choose a reason for hiding this comment

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

The orthogonal change should be handled independently because the PR title should be the main scope of the code.

Please remove this part from this PR.

spotbugs-gradle-plugin = { group = "com.github.spotbugs.snom", name = "spotbugs-gradle-plugin", version.ref = "spotbugs-plugin" }
spotless-plugin-gradle = { group = "com.diffplug.spotless", name = "spotless-plugin-gradle", version.ref = "spotless-plugin" }
shadow = { group = "com.github.johnrengelman", name = "shadow", version.ref = "shadow-jar-plugin"}
shadow = { group = "com.gradleup.shadow", name = "shadow-gradle-plugin", version.ref = "shadow-jar-plugin"}
Copy link
Member

Choose a reason for hiding this comment

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

ditto.

* under the License.
*/
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'
Copy link
Member

Choose a reason for hiding this comment

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

ditto.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

I left a comment about the orthogonal code change part.

@jacobsalway jacobsalway force-pushed the use-jre-to-reduce-docker-image-size branch from 0fea1be to 54e0fd2 Compare March 17, 2025 00:08
@github-actions github-actions bot removed the OPERATOR label Mar 17, 2025
@jacobsalway
Copy link
Contributor Author

I left a comment about the orthogonal code change part.

Thanks for reviewing. I've removed the plugin changes and will raise a separate JIRA/PR for them.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. (Pending CIs). Thank you for updating, @jacobsalway .

@dongjoon-hyun
Copy link
Member

Merged to main. Thank you again, @jacobsalway .

I added you to the Apache Spark contributor group and assigned SPARK-51520 to you.

Welcome to the Apache Spark community and congratulations for your first commit!

@jacobsalway jacobsalway deleted the use-jre-to-reduce-docker-image-size branch March 17, 2025 01:32
@jacobsalway
Copy link
Contributor Author

Thanks @dongjoon-hyun, looking forward to hopefully contributing more in the future

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants