-
Notifications
You must be signed in to change notification settings - Fork 641
[ISSUE #4670] Docker build failed due to a low JDK version #4675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
63c5db3 to
5bd25b7
Compare
|
Docker image can be tested by |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4675 +/- ##
=========================================
Coverage 17.39% 17.39%
- Complexity 1759 1760 +1
=========================================
Files 797 797
Lines 29795 29795
Branches 2578 2578
=========================================
+ Hits 5182 5184 +2
+ Misses 24132 24131 -1
+ Partials 481 480 -1 ☔ View full report in Codecov by Sentry. |
mxsm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greate! LGTM
…ache#4675) * Switch jdk8 to jre11 * Locate Java executable, check version and apply distinguished vm options https://docs.oracle.com/javase/9/tools/java.htm#GUID-BE93ABDC-999C-4CB5-A88B-1994AAAC74D5__CONVERTGCLOGGINGFLAGSTOXLOG-A5046BD1 * Streamline further * minor: Adjust port seq * minor: Streamline a little * Redirect GC logs to log file instead of stdout * Streamline EVENTMESH_LOG_HOME & XLOG_PARAM * Use multi-stage compiled JRE8 env by default * fix: get pid correctly in docker * Generate pid file exactly under /bin * exec builder_8 exactly after builder_11 * Use JDK instead of JRE * Rename dockerfile
Fixes #4670.
Motivation
https://github.com/Pil0tXia/eventmesh/actions/runs/7238476046/job/19719334574
Modifications
Switch builder JDK version from jdk8 to jdk11 and switch container JDK version from jdk8 to jre11.Compile the code in two stages using JDK11 and JDK8, and run the container in a Java8 environment. Optionally, provide a script for running in a Java11 environment.Using JRE instead of JDK as a runtime envrionment can reduce 300MB+ imgae size.start.shto support selecting an available version between Java 8 and Java 11, and set the VM options accordingly.get_pidfunctionality in docker.Docker deployment & compilation documents will be updated later.
Tests
These runtime environments are tested:
Generated files were added:
Connectors or Jdbc Connector are not tested.
Using Java 11:
Using Java 8:
Documentation