Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreThe Spring Boot plugins for Maven and Gradle provide the ability to build Docker images using Cloud Native Buildpacks. By default, Spring Boot uses the CNB builders provided by the Paketo Buildpacks project.
The Paketo Buildpacks project has announced that Ubuntu 18.04 Bionic-based builders are no longer supported, in favor of Ubuntu 22.04 Jammy-based builders. See the Paketo announcement for more details on the builders that are affected by this change.
The Maven and Gradle plugins for Spring Boot versions 3.1 and earlier use the Bionic Base Builder by default when building images to run applications on a JVM, and the Bionic Tiny Builder by default when building images from native executables using GraalVM. Paketo Jammy builders will be the default starting with Spring Boot 3.2.
Users of Spring Boot 3.1 and earlier should make changes to their build configurations to migrate to the Paketo Jammy builders in order to receive regular updates to buildpacks and the dependencies that buildpacks install.
Update November 23 2023: The Paketo team has announced that they will remove access to the Paketo Bionic builders in January 2024. To make this transition easier, Spring Boot has changed the default builder to the Paketo Jammy builder in the maintenance release for versions 2.7.18
, 3.0.13
, and 3.1.6
.
To use the Paketo Jammy builder in a Spring Boot build using Maven, the builder should be configured as shown in this example:
<project>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<builder>paketobuildpacks/builder-jammy-base:latest</builder>
</image>
</configuration>
</plugin>
</plugins>
</build>
</project>
See the Spring Boot Maven plugin documentation for more information on configuring the plugin.
When using Gradle with Groovy, the builder should be configured as shown in this example:
tasks.named("bootBuildImage") {
builder = "paketobuildpacks/builder-jammy-base:latest"
}
When using Gradle with Kotlin, the builder should be configured as shown in this example:
tasks.named<BootBuildImage>("bootBuildImage") {
builder.set("paketobuildpacks/builder-jammy-base:latest")
}
See the Spring Boot Gradle plugin documentation for more information on configuring the plugin.