You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lh0156 (via GitHub)" <gi...@apache.org> on 2026/08/03 06:16:31 UTC

[PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

lh0156 opened a new pull request, #23063:
URL: https://github.com/apache/kafka/pull/23063

   ### What
   
   Update the JVM and native Docker build images to Java 25, the latest LTS supported by Kafka.
   
   - Use Eclipse Temurin 25 JRE Alpine for JVM image build and runtime stages.
   - Use GraalVM Community 25 for native-image compilation.
   - Stop the JVM used for dynamic CDS generation by its captured PID so the JSA archive is generated reliably despite long classpaths being truncated by process discovery.
   
   ### Testing
   
   - `./gradlew releaseTarGz --no-build-cache --console=plain`
   - JVM Docker build stage and final image build with Java 25 passed.
   - JVM JSA generation exercised Kafka startup, topic creation, produce, consume, and graceful shutdown; both `kafka.jsa` and `storage.jsa` were produced.
   - JVM image smoke test: `kafka-topics.sh --version` -> `4.4.0-SNAPSHOT`.
   - GraalVM Community 25 native-image build and final image build passed.
   - Native image smoke test: `kafka.Kafka --help`.
   - `bash -n docker/jvm/jsa_launch docker/native/native_command.sh`
   - `git diff --check`
   
   This change does not modify Kafka APIs, protocols, or configuration semantics, so no KIP is required.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

Posted by "arixmkii (via GitHub)" <gi...@apache.org>.
arixmkii commented on code in PR #23063:
URL: https://github.com/apache/kafka/pull/23063#discussion_r3702792168


##########
docker/native/Dockerfile:
##########
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ghcr.io/graalvm/graalvm-community:21 AS build-native-image
+FROM ghcr.io/graalvm/graalvm-community:25 AS build-native-image

Review Comment:
   It seems Mandrel images are only published to Quay https://groups.google.com/g/quarkus-dev/c/Cs-9VKrASbI?pli=1 and are heavily leaning toward RHEL runtimes, so, it should be checked if they are suitable to be used as a replacement as is.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 closed pull request #23063: KAFKA-20857: Use Java 25 in Docker images
URL: https://github.com/apache/kafka/pull/23063


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

Posted by "gaurav-narula (via GitHub)" <gi...@apache.org>.
gaurav-narula commented on code in PR #23063:
URL: https://github.com/apache/kafka/pull/23063#discussion_r3842124521


##########
docker/jvm/jsa_launch:
##########
@@ -20,6 +20,7 @@ TOPIC="test-topic"
 KAFKA_JVM_PERFORMANCE_OPTS="-XX:ArchiveClassesAtExit=storage.jsa" opt/kafka/bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c opt/kafka/config/server.properties
 
 KAFKA_JVM_PERFORMANCE_OPTS="-XX:ArchiveClassesAtExit=kafka.jsa" opt/kafka/bin/kafka-server-start.sh opt/kafka/config/server.properties &
+KAFKA_PID=$!

Review Comment:
   I think the changes to this file are not required after https://github.com/apache/kafka/pull/22990



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

Posted by "arixmkii (via GitHub)" <gi...@apache.org>.
arixmkii commented on code in PR #23063:
URL: https://github.com/apache/kafka/pull/23063#discussion_r3702742680


##########
docker/native/Dockerfile:
##########
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ghcr.io/graalvm/graalvm-community:21 AS build-native-image
+FROM ghcr.io/graalvm/graalvm-community:25 AS build-native-image

Review Comment:
   GraalVM community has moved to new release scheme delivering CPU only with feature releases. Current one has tag `25i2` which can be viewed in https://github.com/graalvm/container/pkgs/container/graalvm-community and is equivalent of https://github.com/graalvm/graalvm-ce-builds/releases/tag/graal-25.2.4 
   
   OpenJDK LTS support equivalent to GraalVM EE by Oracle will be only available from mandrel project https://github.com/graalvm/mandrel but they lag behind with release times and I'm not sure of they publish ready to use Docker images.
   
   Current `ghcr.io/graalvm/graalvm-community:25` is 6 months old already (missing 2 CPU releases). It is not a great option to have.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #23063:
URL: https://github.com/apache/kafka/pull/23063#issuecomment-5804419915

   duplicate to #23535


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20857: Use Java 25 in Docker images [kafka]

Posted by "lh0156 (via GitHub)" <gi...@apache.org>.
lh0156 commented on code in PR #23063:
URL: https://github.com/apache/kafka/pull/23063#discussion_r3703046362


##########
docker/native/Dockerfile:
##########
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ghcr.io/graalvm/graalvm-community:21 AS build-native-image
+FROM ghcr.io/graalvm/graalvm-community:25 AS build-native-image

Review Comment:
   Addressed in e348eaed82.
   
   - Updated the native build image from `ghcr.io/graalvm/graalvm-community:25` to `25i2`, the current JDK 25.0.4 CPU-release tag available for both linux/amd64 and linux/arm64.
   - Updated the native-image documentation link from the JDK 21-specific page to GraalVM's version-neutral page.
   - The RED regression assertion reproduced the stale `:25` tag; the GREEN assertion passes after the change, and `git diff --check` passes.
   
   A local Docker build check could not resolve registry metadata because this environment lacks `docker-credential-desktop`; the public GHCR manifest was verified directly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org