[ISSUE #4670] Docker build failed due to a low JDK version #4675
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.sh
to support selecting an available version between Java 8 and Java 11, and set the VM options accordingly.get_pid
functionality 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