Use paketobuildpacks/builder-noble-java-tiny as the default image builder

Closes gh-42711
This commit is contained in:
Moritz Halbritter
2025-04-24 15:21:22 +02:00
parent 29e0865afd
commit 0fb369e8b8
78 changed files with 122 additions and 111 deletions
@@ -33,9 +33,9 @@ This means you can just type a single command and quickly get a sensible image i
The resulting image doesn't contain a JVM, instead the native image is compiled statically.
This leads to smaller images.
NOTE: The CNB builder used for the images is `paketobuildpacks/builder-jammy-java-tiny:latest`.
NOTE: The CNB builder used for the images is `paketobuildpacks/builder-noble-java-tiny:latest`.
It has a small footprint and reduced attack surface. It does not include a shell and contains a reduced set of system libraries.
Use `paketobuildpacks/builder-jammy-base:latest` or `paketobuildpacks/builder-jammy-full:latest` to have more tools available in the image if required.
If you need more tools in the resulting image, you can use `paketobuildpacks/ubuntu-noble-run-base:latest` as the *run* image.
@@ -66,7 +66,7 @@ Assuming an AOT processed Spring Boot executable jar built as `myproject-0.0.1-S
[source,shell]
----
$ pack build --builder paketobuildpacks/builder-jammy-java-tiny \
$ pack build --builder paketobuildpacks/builder-noble-java-tiny \
--path target/myproject-0.0.1-SNAPSHOT.jar \
--env 'BP_NATIVE_IMAGE=true' \
my-application:0.0.1-SNAPSHOT
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
*/
public class BuildRequest {
static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder-jammy-java-tiny";
static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder-noble-java-tiny";
static final String DEFAULT_BUILDER_IMAGE_REF = DEFAULT_BUILDER_IMAGE_NAME + ":latest";
@@ -161,8 +161,8 @@ class BootBuildImageIntegrationTests {
writeMainClass();
writeLongNameResource();
BuildResult result = this.gradleBuild.build("bootBuildImage", "--pullPolicy=IF_NOT_PRESENT",
"--imageName=example/test-image-cmd", "--builder=ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1",
"--trustBuilder", "--runImage=paketobuildpacks/run-jammy-tiny", "--createdDate=2020-07-01T12:34:56Z",
"--imageName=example/test-image-cmd", "--builder=ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2",
"--trustBuilder", "--runImage=paketobuildpacks/run-noble-tiny", "--createdDate=2020-07-01T12:34:56Z",
"--applicationDirectory=/application");
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
assertThat(result.getOutput()).contains("example/test-image-cmd");
@@ -412,9 +412,9 @@ class BootBuildImageIntegrationTests {
void buildsImageOnLinuxArmWithImagePlatformLinuxArm() throws IOException {
writeMainClass();
writeLongNameResource();
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1";
String runImage = "docker.io/paketobuildpacks/run-jammy-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.1";
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2";
String runImage = "docker.io/paketobuildpacks/run-noble-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.2";
removeImages(builderImage, runImage, buildpackImage);
BuildResult result = this.gradleBuild.build("bootBuildImage");
String projectName = this.gradleBuild.getProjectDir().getName();
@@ -440,9 +440,9 @@ class BootBuildImageIntegrationTests {
void failsWhenBuildingOnLinuxAmdWithImagePlatformLinuxArm() throws IOException {
writeMainClass();
writeLongNameResource();
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1";
String runImage = "docker.io/paketobuildpacks/run-jammy-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.1";
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2";
String runImage = "docker.io/paketobuildpacks/run-noble-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.2";
removeImages(builderImage, runImage, buildpackImage);
BuildResult result = this.gradleBuild.buildAndFail("bootBuildImage");
String projectName = this.gradleBuild.getProjectDir().getName();
@@ -4,8 +4,8 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
runImage = "paketobuildpacks/run-jammy-tiny"
buildpacks = ["ghcr.io/spring-io/spring-boot-test-info:0.0.1"]
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
runImage = "paketobuildpacks/run-noble-tiny"
buildpacks = ["ghcr.io/spring-io/spring-boot-test-info:0.0.2"]
imagePlatform = "linux/arm64"
}
@@ -8,7 +8,7 @@ if (project.hasProperty('applyWarPlugin')) {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
applicationDirectory = "/application"
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildWorkspace {
bind {
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
bindings = [ "${projectDir}/bindings/ca-certificates:/platform/bindings/certificates" as String ]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildpacks = [ "spring-boot/spring-boot-test-info" ]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildpacks = [ "file://${projectDir}/buildpack/hello-world" as String ]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildpacks = [ "file://${projectDir}/hello-world.tgz" as String ]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildpacks = ["ghcr.io/spring-io/spring-boot-test-info:0.0.1"]
buildpacks = ["ghcr.io/spring-io/spring-boot-test-info:0.0.2"]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
createdDate = "2020-07-01T12:34:56Z"
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
createdDate = "now"
}
@@ -5,7 +5,7 @@ plugins {
bootBuildImage {
imageName = "example/test-image-custom"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
runImage = "paketobuildpacks/run-jammy-tiny"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
runImage = "paketobuildpacks/run-noble-tiny"
pullPolicy = "IF_NOT_PRESENT"
}
@@ -5,6 +5,6 @@ plugins {
bootBuildImage {
imageName = "example/test-image-name"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
securityOptions = []
}
@@ -8,6 +8,6 @@ bootJar {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
}
@@ -8,7 +8,7 @@ if (project.hasProperty('applyWarPlugin')) {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
network = "none"
}
@@ -10,6 +10,6 @@ if (project.hasProperty('applyWarPlugin')) {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = PullPolicy.ALWAYS
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
tags = [ "example.com/myapp:latest" ]
}
@@ -8,7 +8,7 @@ if (project.hasProperty('applyWarPlugin')) {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
trustBuilder = true
pullPolicy = "IF_NOT_PRESENT"
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildWorkspace {
volume {
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
archiveFile = bootWar.archiveFile
}
}
@@ -4,8 +4,8 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
runImage = "paketobuildpacks/run-jammy-tiny"
buildpacks = ["ghcr.io/spring-io/spring-boot-test-info:0.0.1"]
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
runImage = "paketobuildpacks/run-noble-tiny"
buildpacks = ["ghcr.io/spring-io/spring-boot-test-info:0.0.2"]
imagePlatform = "linux/arm64"
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
buildCache {
volume {
name = "build-cache-volume"
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
environment = ["FORCE_FAILURE": "true"]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
buildpacks = [ "urn:cnb:builder:example/does-not-exist:0.0.1" ]
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
createdDate = "invalid date"
}
@@ -4,7 +4,7 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
tags = [ "example/Invalid-Tag-Name" ]
}
@@ -8,6 +8,6 @@ if (project.hasProperty('applyWarPlugin')) {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
pullPolicy = "IF_NOT_PRESENT"
}
@@ -4,6 +4,6 @@ plugins {
}
bootBuildImage {
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
builder = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2"
publish = true
}
@@ -119,12 +119,12 @@ The following table summarizes the available properties and their default values
| `builder`
| `--builder`
| Name of the builder image to use.
| `paketobuildpacks/builder-jammy-java-tiny:latest`
| `paketobuildpacks/builder-noble-java-tiny:latest`
| `trustBuilder`
| `--trustBuilder`
| Whether to treat the builder as {url-buildpacks-docs}/for-platform-operators/how-to/integrate-ci/pack/concepts/trusted_builders/#what-is-a-trusted-builder[trusted].
| `true` if the builder is one of `paketobuildpacks/builder-jammy-java-tiny`, `paketobuildpacks/builder-noble-java-tiny`, `paketobuildpacks/builder-jammy-tiny`, `paketobuildpacks/builder-jammy-base`, `paketobuildpacks/builder-jammy-full`, `paketobuildpacks/builder-jammy-buildpackless-tiny`, `paketobuildpacks/builder-jammy-buildpackless-base`, `paketobuildpacks/builder-jammy-buildpackless-full`, `gcr.io/buildpacks/builder`, `heroku/builder`; `false` otherwise.
| `true` if the builder is one of `paketobuildpacks/builder-noble-java-tiny`, `paketobuildpacks/builder-jammy-java-tiny`, `paketobuildpacks/builder-jammy-tiny`, `paketobuildpacks/builder-jammy-base`, `paketobuildpacks/builder-jammy-full`, `paketobuildpacks/builder-jammy-buildpackless-tiny`, `paketobuildpacks/builder-jammy-buildpackless-base`, `paketobuildpacks/builder-jammy-buildpackless-full`, `gcr.io/buildpacks/builder`, `heroku/builder`; `false` otherwise.
| `imagePlatform`
| `--imagePlatform`
@@ -251,8 +251,8 @@ NOTE: The plugin detects the target Java compatibility of the project using the
When using the default Paketo builder and buildpacks, the plugin instructs the buildpacks to install the same Java version.
You can override this behavior as shown in the xref:packaging-oci-image.adoc#build-image.examples.builder-configuration[builder configuration] examples.
NOTE: The default builder `paketobuildpacks/builder-jammy-java-tiny:latest` contains a reduced set of system libraries and does not include a shell.
Applications that require a shell to run a start script, as might be the case when the {url-gradle-docs-application-plugin}[`application` plugin] has been applied to generate a distribution zip archive, or that depend upon a system library that is not present, should override the `builder` configuration to use one that includes a shell and a broader set of system libraries, such as `paketobuildpacks/builder-jammy-base:latest` or `paketobuildpacks/builder-jammy-full:latest`.
NOTE: The default builder `paketobuildpacks/builder-noble-java-tiny:latest` contains a reduced set of system libraries and does not include a shell.
Applications that require a shell to run a start script, as might be the case when the {url-gradle-docs-application-plugin}[`application` plugin] has been applied to generate a distribution zip archive, or that depend upon a system library that is not present, should override the `runImage` configuration to use one that includes a shell and a broader set of system libraries, such as `paketobuildpacks/ubuntu-noble-run-base:latest`.
@@ -174,7 +174,7 @@ class BootBuildImageTests {
@Test
void whenNoBuilderIsConfiguredThenRequestHasDefaultBuilder() {
BuildRequest request = this.buildImage.createRequest();
assertThat(request.getBuilder().getName()).isEqualTo("paketobuildpacks/builder-jammy-java-tiny");
assertThat(request.getBuilder().getName()).isEqualTo("paketobuildpacks/builder-noble-java-tiny");
assertThat(request.isTrustBuilder()).isTrue();
}
@@ -270,9 +270,9 @@ class BuildImageTests extends AbstractArchiveIntegrationTests {
.goals("package")
.systemProperty("spring-boot.build-image.pullPolicy", "IF_NOT_PRESENT")
.systemProperty("spring-boot.build-image.imageName", "example.com/test/cmd-property-name:v1")
.systemProperty("spring-boot.build-image.builder", "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1")
.systemProperty("spring-boot.build-image.builder", "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2")
.systemProperty("spring-boot.build-image.trustBuilder", "true")
.systemProperty("spring-boot.build-image.runImage", "paketobuildpacks/run-jammy-tiny")
.systemProperty("spring-boot.build-image.runImage", "paketobuildpacks/run-noble-tiny")
.systemProperty("spring-boot.build-image.createdDate", "2020-07-01T12:34:56Z")
.systemProperty("spring-boot.build-image.applicationDirectory", "/application")
.execute((project) -> {
@@ -540,9 +540,9 @@ class BuildImageTests extends AbstractArchiveIntegrationTests {
@EnabledOnOs(value = { OS.LINUX, OS.MAC }, architectures = "aarch64",
disabledReason = "Lifecycle will only run on ARM architecture")
void whenBuildImageIsInvokedOnLinuxArmWithImagePlatformLinuxArm(MavenBuild mavenBuild) throws IOException {
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1";
String runImage = "docker.io/paketobuildpacks/run-jammy-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.1";
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2";
String runImage = "docker.io/paketobuildpacks/run-noble-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.2";
removeImages(builderImage, runImage, buildpackImage);
mavenBuild.project("dockerTest", "build-image-platform-linux-arm").goals("package").execute((project) -> {
File jar = new File(project, "target/build-image-platform-linux-arm-0.0.1.BUILD-SNAPSHOT.jar");
@@ -564,9 +564,9 @@ class BuildImageTests extends AbstractArchiveIntegrationTests {
@EnabledOnOs(value = { OS.LINUX, OS.MAC }, architectures = "amd64",
disabledReason = "The expected failure condition will not fail on ARM architectures")
void failsWhenBuildImageIsInvokedOnLinuxAmdWithImagePlatformLinuxArm(MavenBuild mavenBuild) throws IOException {
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1";
String runImage = "docker.io/paketobuildpacks/run-jammy-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.1";
String builderImage = "ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2";
String runImage = "docker.io/paketobuildpacks/run-noble-tiny:latest";
String buildpackImage = "ghcr.io/spring-io/spring-boot-test-info:0.0.2";
removeImages(buildpackImage, runImage, buildpackImage);
mavenBuild.project("dockerTest", "build-image-platform-linux-arm")
.goals("package")
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<applicationDirectory>/application</applicationDirectory>
</image>
</configuration>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<buildpacks>
<buildpack>urn:cnb:builder:example/does-not-exist:0.0.1</buildpack>
</buildpacks>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<buildWorkspace>
<bind>
<source>${java.io.tmpdir}/junit-image-cache-${test-build-id}-work</source>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<bindings>
<binding>${basedir}/bindings/ca-certificates:/platform/bindings/ca-certificates</binding>
</bindings>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<env>
<FORCE_FAILURE>true</FORCE_FAILURE>
</env>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<buildCache>
<volume>
<name>build-cache-volume1</name>
@@ -45,7 +45,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -39,7 +39,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -29,7 +29,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -19,7 +19,7 @@
<version>@project.version@</version>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</plugin>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<createdDate>2020-07-01T12:34:56Z</createdDate>
</image>
</configuration>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<createdDate>now</createdDate>
</image>
</configuration>
@@ -23,8 +23,8 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<runImage>paketobuildpacks/run-jammy-tiny</runImage>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<runImage>paketobuildpacks/run-noble-tiny</runImage>
</image>
</configuration>
</execution>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<buildpacks>
<buildpack>urn:cnb:builder:spring-boot/spring-boot-test-info</buildpack>
</buildpacks>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<name>example.com/test/build-image:${project.version}</name>
</image>
</configuration>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<env>
<EMPTY_KEY></EMPTY_KEY>
</env>
@@ -25,7 +25,7 @@
<configuration>
<finalName>final-name</finalName>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -27,7 +27,7 @@
<configuration>
<classifier>exec</classifier>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</plugin>
@@ -31,7 +31,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<network>none</network>
</image>
</configuration>
@@ -23,10 +23,10 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<runImage>paketobuildpacks/run-jammy-tiny</runImage>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<runImage>paketobuildpacks/run-noble-tiny</runImage>
<buildpacks>
<buildpack>ghcr.io/spring-io/spring-boot-test-info:0.0.1</buildpack>
<buildpack>ghcr.io/spring-io/spring-boot-test-info:0.0.2</buildpack>
</buildpacks>
<imagePlatform>linux/arm64</imagePlatform>
</image>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<publish>true</publish>
</image>
</configuration>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<security-options/>
</image>
</configuration>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<tags>
<tag>${project.artifactId}:latest</tag>
</tags>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<trustBuilder>true</trustBuilder>
</image>
</configuration>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
<buildWorkspace>
<volume>
<name>cache-${test-build-id}.work</name>
@@ -24,7 +24,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -29,7 +29,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -26,7 +26,7 @@
<configuration>
<layout>ZIP</layout>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</plugin>
@@ -23,7 +23,7 @@
</goals>
<configuration>
<image>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1</builder>
<builder>ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.2</builder>
</image>
</configuration>
</execution>
@@ -135,12 +135,12 @@ The following table summarizes the available parameters and their default values
| `builder` +
(`spring-boot.build-image.builder`)
| Name of the builder image to use.
| `paketobuildpacks/builder-jammy-java-tiny:latest`
| `paketobuildpacks/builder-noble-java-tiny:latest`
| `trustBuilder` +
(`spring-boot.build-image.trustBuilder`)
| Whether to treat the builder as {url-buildpacks-docs}/for-platform-operators/how-to/integrate-ci/pack/concepts/trusted_builders/#what-is-a-trusted-builder[trusted].
| `true` if the builder is one of `paketobuildpacks/builder-jammy-java-tiny`, `paketobuildpacks/builder-noble-java-tiny`, `paketobuildpacks/builder-jammy-tiny`, `paketobuildpacks/builder-jammy-base`, `paketobuildpacks/builder-jammy-full`, `paketobuildpacks/builder-jammy-buildpackless-tiny`, `paketobuildpacks/builder-jammy-buildpackless-base`, `paketobuildpacks/builder-jammy-buildpackless-full`, `gcr.io/buildpacks/builder`, `heroku/builder`; `false` otherwise.
| `true` if the builder is one of `paketobuildpacks/builder-noble-java-tiny`, `paketobuildpacks/builder-jammy-java-tiny`, `paketobuildpacks/builder-jammy-tiny`, `paketobuildpacks/builder-jammy-base`, `paketobuildpacks/builder-jammy-full`, `paketobuildpacks/builder-jammy-buildpackless-tiny`, `paketobuildpacks/builder-jammy-buildpackless-base`, `paketobuildpacks/builder-jammy-buildpackless-full`, `gcr.io/buildpacks/builder`, `heroku/builder`; `false` otherwise.
| `imagePlatform` +
(`spring-boot.build-image.imagePlatform`)
@@ -71,7 +71,7 @@ class ImageTests {
void getBuildRequestWhenNoCustomizationsUsesDefaults() {
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName()).hasToString("docker.io/library/my-app:0.0.1-SNAPSHOT");
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder-jammy-java-tiny");
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder-noble-java-tiny");
assertThat(request.isTrustBuilder()).isTrue();
assertThat(request.getRunImage()).isNull();
assertThat(request.getEnv()).isEmpty();
@@ -109,7 +109,7 @@ class ImageTests {
Image image = new Image();
image.trustBuilder = false;
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder-jammy-java-tiny");
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder-noble-java-tiny");
assertThat(request.isTrustBuilder()).isFalse();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -278,9 +278,9 @@ class PaketoBuilderTests {
"paketo-buildpacks/apache-tomcat", "paketo-buildpacks/dist-zip",
"paketo-buildpacks/spring-boot");
metadata.processOfType("web")
.containsSubsequence("java", "org.apache.catalina.startup.Bootstrap", "start");
.containsSubsequence("sh", "/layers/paketo-buildpacks_apache-tomcat/tomcat/bin/catalina.sh", "run");
metadata.processOfType("tomcat")
.containsSubsequence("java", "org.apache.catalina.startup.Bootstrap", "start");
.containsSubsequence("sh", "/layers/paketo-buildpacks_apache-tomcat/tomcat/bin/catalina.sh", "run");
});
assertImageHasJvmSbomLayer(imageReference, config);
assertImageHasDependenciesSbomLayer(imageReference, config, "apache-tomcat");
@@ -39,6 +39,5 @@ application {
bootBuildImage {
archiveFile = bootDistZip.archiveFile
builder = "paketobuildpacks/builder-jammy-base:latest"
environment = ['BP_JVM_VERSION': java.targetCompatibility.getMajorVersion()]
}
}
@@ -39,6 +39,6 @@ application {
bootBuildImage {
archiveFile = distZip.archiveFile
builder = "paketobuildpacks/builder-jammy-base:latest"
runImage = "paketobuildpacks/ubuntu-noble-run-base:latest"
environment = ['BP_JVM_VERSION': java.targetCompatibility.getMajorVersion()]
}
}
@@ -32,5 +32,6 @@ war {
bootBuildImage {
archiveFile = war.archiveFile
runImage = "paketobuildpacks/ubuntu-noble-run-base:latest"
environment = ['BP_JVM_VERSION': java.targetCompatibility.getMajorVersion(), 'BP_TOMCAT_VERSION': '10.*']
}
@@ -0,0 +1,11 @@
FROM ubuntu:noble-20250404 as prepare
COPY downloads/* /opt/download/
RUN mkdir -p /opt/jdk && \
cd /opt/jdk && \
tar xzf /opt/download/* --strip-components=1
FROM ubuntu:noble-20250404
RUN apt-get update && apt-get install -y software-properties-common curl
COPY --from=prepare /opt/jdk /opt/jdk
ENV JAVA_HOME /opt/jdk
ENV PATH $JAVA_HOME/bin:$PATH
@@ -1,4 +1,4 @@
FROM ubuntu:jammy-20231211.1
FROM ubuntu:noble-20250404
RUN apt-get update && \
apt-get install -y software-properties-common curl && \
mkdir -p /opt/oraclejdk && \
@@ -1,4 +1,4 @@
FROM ubuntu:jammy-20231211.1
FROM ubuntu:noble-20250404
RUN apt-get update && \
apt-get install -y software-properties-common curl && \
mkdir -p /opt/oraclejdk && \
@@ -1,10 +1,10 @@
FROM ubuntu:jammy-20240405 as prepare
FROM ubuntu:noble-20250404 as prepare
COPY downloads/* /opt/download/
RUN mkdir -p /opt/jdk && \
cd /opt/jdk && \
tar xzf /opt/download/* --strip-components=1
FROM ubuntu:jammy-20240405
FROM ubuntu:noble-20250404
COPY --from=prepare /opt/jdk /opt/jdk
ENV JAVA_HOME /opt/jdk
ENV PATH $JAVA_HOME/bin:$PATH
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -106,7 +106,7 @@ class SniIntegrationTests {
protected ApplicationContainer(String appName, String fileSuffix, String... entryPointArgs) {
super(new ImageFromDockerfile().withFileFromFile("spring-boot.jar", findJarFile(appName, fileSuffix))
.withDockerfileFromBuilder((builder) -> builder.from("eclipse-temurin:17-jre-jammy")
.withDockerfileFromBuilder((builder) -> builder.from("eclipse-temurin:17-jre-noble")
.add("spring-boot.jar", "/spring-boot.jar")
.entryPoint(buildEntryPoint(entryPointArgs))));
withExposedPorts(SERVER_PORT);