Skip to content

feat: Use multistage Docker build for selecting JRE#9392

Merged
usmansaleem merged 8 commits intobesu-eth:mainfrom
usmansaleem:update_docker_jvm
Nov 11, 2025
Merged

feat: Use multistage Docker build for selecting JRE#9392
usmansaleem merged 8 commits intobesu-eth:mainfrom
usmansaleem:update_docker_jvm

Conversation

@usmansaleem
Copy link
Copy Markdown
Contributor

@usmansaleem usmansaleem commented Nov 3, 2025

PR description

feat: Use multistage Docker build for selecting JRE
-- Use multistage docker build to select JRE for Besu
-- Fix minor issues in Docker build file

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests
  • hive tests: Engine or other RPCs modified?

 -- Use multistage docker build to select JRE for Besu
 -- Fix minor issues in Docker build file

Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Usman Saleem <usman@usmans.info>
@usmansaleem usmansaleem requested a review from fab-10 November 3, 2025 18:53
Signed-off-by: Usman Saleem <usman@usmans.info>
Copilot AI review requested due to automatic review settings November 4, 2025 00:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

LGTM, please add a CHANGELOG stating that we are now using Temurin instead of plain OpenJDK

"--add-opens",
"java.base/java.nio=ALL-UNNAMED"
"java.base/java.nio=ALL-UNNAMED",
"--enable-native-access=ALL-UNNAMED"
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.

why this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is to avoid warning message that JVM 24+ issues when starting Besu because we are using JNA to load native libraries. It seems to be backward compatible (at least no error is raised) with Java 21 as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Usman Saleem <usman@usmans.info>
Copy link
Copy Markdown
Contributor

@ahamlat ahamlat left a comment

Choose a reason for hiding this comment

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

Async Profiler is working as expected 👍

Signed-off-by: Usman Saleem <usman@usmans.info>
@usmansaleem usmansaleem enabled auto-merge (squash) November 8, 2025 13:01
Signed-off-by: Usman Saleem <usman@usmans.info>
@usmansaleem usmansaleem merged commit f4affbd into besu-eth:main Nov 11, 2025
46 of 61 checks passed
@usmansaleem usmansaleem deleted the update_docker_jvm branch November 11, 2025 00:48
jflo pushed a commit to jflo/besu that referenced this pull request Nov 17, 2025
-- Use multistage docker build to select JRE for Besu
-- Fix minor issues in Docker build file

Signed-off-by: Usman Saleem <usman@usmans.info>
pinges pushed a commit to pinges/besu that referenced this pull request Dec 15, 2025
-- Use multistage docker build to select JRE for Besu
-- Fix minor issues in Docker build file

Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
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.

4 participants