Skip to content

Commit 7e29e3c

Browse files
committed
Merge branch '4.0.x'
2 parents ff16b0e + 2e6d53e commit 7e29e3c

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

  • documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/container-images

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/container-images/dockerfiles.adoc

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,10 @@ Additionally, the layout created by the `jarmode` is AOT cache (and CDS) friendl
5454

5555

5656

57-
[[packaging.container-images.dockerfiles.aot-cache]]
58-
== AOT Cache
59-
60-
NOTE: If you're using Java < 24, AOT cache is not available.
61-
You have to use CDS instead.
62-
63-
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`:
64-
[source,dockerfile]
65-
----
66-
include::reference:partial$dockerfile[]
67-
# Execute the AOT cache training run
68-
RUN java -XX:AOTCacheOutput=app.aot -Dspring.context.exit=onRefresh -jar application.jar
69-
# Start the application jar with AOT cache enabled - this is not the uber jar used by the builder
70-
# This jar only contains application code and references to the extracted jar files
71-
# This layout is efficient to start up and AOT cache friendly
72-
ENTRYPOINT ["java", "-XX:AOTCache=app.aot", "-jar", "application.jar"]
73-
----
74-
75-
This is mostly the same as the above `Dockerfile`.
76-
As the last steps, it creates the AOT cache file by doing a training run and passes the AOT cache parameter to `java -jar`.
77-
78-
79-
8057
[[packaging.container-images.dockerfiles.aot-cache]]
8158
== AOT cache
8259

83-
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`:
60+
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`:
8461
[source,dockerfile]
8562
----
8663
include::reference:partial$dockerfile[]

0 commit comments

Comments
 (0)