You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting with Spring Boot 2.3.0, a JAR file built with the Spring Boot Maven or Gradle plugin includes layer information in the JAR file. This layer information separates parts of the application based on how likely they are to change between application builds. This can be used to make Docker image layers even more efficient.
hi @jaiiye, thanks so much for making this issue. I've talked to the team and we've gone ahead and labelled this as a feature request. We are hoping some of our Java/Spring Boot community members might want to tackle this. ❤️
Feature request
Starting with Spring Boot 2.3.0, a JAR file built with the Spring Boot Maven or Gradle plugin includes layer information in the JAR file. This layer information separates parts of the application based on how likely they are to change between application builds. This can be used to make Docker image layers even more efficient.
But layering has special requirements for directory structure,Here is an example of building a docker
Dockerfiles
There is a method mentioned here #685 , it is not currently supported.
I use a similar configuration,expect it to work:
`
[phases.build]
cmds = ["...", "java -Djarmode=layertools -jar target/*-exec.jar extract"]
[start]
runImage = "eclipse-temurin:17-jdk-alpine"
onlyIncludeFiles = [
{ from = './dependencies/', to = './' },
{ from = './snapshot-dependencies/', to = './' },
{ from = './spring-boot-loader/', to = './' },
{ from = './application/', to = './' }
]
cmd = "java $JAVA_OPTS org.springframework.boot.loader.JarLauncher"
`
Motivation
No response
Contribution
No response
The text was updated successfully, but these errors were encountered: