From 2e6d53e664150112ed8dc814851e75626b922cc1 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 22 May 2026 14:42:43 -0700 Subject: [PATCH] Remove accidentally duplicated dockerfile documentation Remove duplication accidentally introduced during merge. See gh-50482 --- .../container-images/dockerfiles.adoc | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/container-images/dockerfiles.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/container-images/dockerfiles.adoc index 39de055dcbb..e188df664c6 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/container-images/dockerfiles.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/container-images/dockerfiles.adoc @@ -54,33 +54,10 @@ Additionally, the layout created by the `jarmode` is AOT cache (and CDS) friendl -[[packaging.container-images.dockerfiles.aot-cache]] -== AOT Cache - -NOTE: If you're using Java < 24, AOT cache is not available. -You have to use CDS instead. - -If you want to additionally enable the xref:reference:packaging/aot-cache.adoc#packaging.aot-cache.aot-cache[AOT cache], you can use this `Dockerfile`: -[source,dockerfile] ----- -include::reference:partial$dockerfile[] -# Execute the AOT cache training run -RUN java -XX:AOTCacheOutput=app.aot -Dspring.context.exit=onRefresh -jar application.jar -# Start the application jar with AOT cache enabled - this is not the uber jar used by the builder -# This jar only contains application code and references to the extracted jar files -# This layout is efficient to start up and AOT cache friendly -ENTRYPOINT ["java", "-XX:AOTCache=app.aot", "-jar", "application.jar"] ----- - -This is mostly the same as the above `Dockerfile`. -As the last steps, it creates the AOT cache file by doing a training run and passes the AOT cache parameter to `java -jar`. - - - [[packaging.container-images.dockerfiles.aot-cache]] == AOT cache -If you are using Java 25 or above, and want to additionally enable the xref:reference:packaging/class-data-sharing.adoc#packaging.class-data-sharing.aot-cache[AOT cache], you can use this `Dockerfile`: +If you are using Java 25 or above, and want to additionally enable the xref:reference:packaging/aot-cache.adoc#packaging.aot-cache.aot-cache[AOT cache], you can use this `Dockerfile`: [source,dockerfile] ---- include::reference:partial$dockerfile[]