Background
JDK 8 and JDK 11 have reached End of Life (EOL):
- JDK 8: EOL in March 2022 (extended support ends in 2030)
- JDK 11: EOL in September 2023 (extended support ends in 2026)
Currently, our Docker build environments use different JDK versions and installation methods across different Linux distributions, which creates inconsistency and makes it difficult to test compatibility with newer JDK versions.
Current State
| Image |
JDK Version |
Installation Method |
Issue |
| ubuntu24 |
JDK 8 |
apt (PPA) |
External dependency, EOL version |
| debian11 |
JDK 11 |
apt |
EOL version |
| centos7 |
JDK 8 |
yum |
EOL version |
| rockylinux8 |
JDK 8 |
dnf |
EOL version |
| azurelinux3 |
JDK 17 |
tdnf (msopenjdk) |
Inconsistent with other images |
Motivation
- Future-proofing: Prepare for migration to JDK 17/21 (LTS versions with active support)
- Testing flexibility: Enable developers to test compatibility across multiple JDK versions without rebuilding images
- Consistency: Standardize JDK installation approach across all Docker environments
- Reduce external dependencies: Remove reliance on distribution-specific package managers and PPAs
- Compliance: Address security and compliance requirements related to EOL software
Proposed Solution
Implement a unified multi-JDK support approach across all Docker build images using Eclipse Temurin binaries. This solution provides flexibility at both build time (via build args) and runtime (via switching scripts).
Key Features
- Install multiple JDK versions (8, 11, 17, 21) from Eclipse Temurin binaries
- Flexible build-time configuration via
JDK_VERSIONS and DEFAULT_JDK build args
- Default to JDK 8 for backward compatibility (when no build args specified)
- Runtime switching via
set-java utility script
- Dynamic JAVA_HOME that updates automatically after switching versions
- Consistent across all platforms (Ubuntu, Debian, CentOS, Rocky Linux, Azure Linux)
Background
JDK 8 and JDK 11 have reached End of Life (EOL):
Currently, our Docker build environments use different JDK versions and installation methods across different Linux distributions, which creates inconsistency and makes it difficult to test compatibility with newer JDK versions.
Current State
Motivation
Proposed Solution
Implement a unified multi-JDK support approach across all Docker build images using Eclipse Temurin binaries. This solution provides flexibility at both build time (via build args) and runtime (via switching scripts).
Key Features
JDK_VERSIONSandDEFAULT_JDKbuild argsset-javautility script