Upgrade Docker image Java version
MSALUpgrade Docker image tags to use the specified Java version. Updates common Java Docker images including eclipse-temurin, amazoncorretto, azul/zulu-openjdk, and others. Also migrates deprecated images (openjdk, adoptopenjdk) to eclipse-temurin, preserving any tag suffix such as -jre-alpine. The eclipse-temurin and amazoncorretto based maven build images move to the 3 or maintained 3.9 line, including from the deprecated maven:3-jdk-8, while the gradle build images move to a Gradle release that runs on the new Java version where the old one can not, as in gradle:8-jdk17 becoming gradle:9-jdk25. A pinned patch or update version is dropped, as in 17.0.9_9-jdk becoming 25-jdk, as images are not published for that patch of the new version. When a FROM is built from a build argument, the default value of the corresponding global ARG is upgraded instead, such that ARG java_version=17 used as FROM eclipse-temurin:${java_version} becomes ARG java_version=25. Image references built from arguments without a default value are left untouched, as their value can not be determined statically. A digest pin is dropped when the tag is upgraded, as the stale digest would otherwise keep resolving to the old image.
org. openrewrite. java. migrate. UpgradeDockerImageVersionRequired
The Java version to upgrade to.
mod run . --recipe= org. openrewrite. java. migrate. UpgradeDockerImageVersion \
-P version=11Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.