diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/dockerTest/java/org/springframework/boot/buildpack/platform/docker/DockerApiIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/dockerTest/java/org/springframework/boot/buildpack/platform/docker/DockerApiIntegrationTests.java index 4fb4e72c30..bf720ec5fb 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/dockerTest/java/org/springframework/boot/buildpack/platform/docker/DockerApiIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/dockerTest/java/org/springframework/boot/buildpack/platform/docker/DockerApiIntegrationTests.java @@ -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. @@ -36,7 +36,7 @@ class DockerApiIntegrationTests { @Test void pullImage() throws IOException { this.docker.image() - .pull(ImageReference.of("gcr.io/paketo-buildpacks/builder:base"), null, + .pull(ImageReference.of("docker.io/paketobuildpacks/builder:base"), null, new TotalProgressPullListener(new TotalProgressBar("Pulling: "))); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderTests.java index 239143aa47..8a265efea4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderTests.java @@ -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. @@ -155,14 +155,14 @@ class BuilderTests { Image builderImage = loadImage("image-with-no-run-image-tag.json"); Image runImage = loadImage("run-image.json"); given(docker.image() - .pull(eq(ImageReference.of("gcr.io/paketo-buildpacks/builder:latest")), isNull(), any(), isNull())) + .pull(eq(ImageReference.of("docker.io/paketobuildpacks/builder:latest")), isNull(), any(), isNull())) .willAnswer(withPulledImage(builderImage)); given(docker.image() .pull(eq(ImageReference.of("docker.io/cloudfoundry/run:latest")), eq(ImagePlatform.from(builderImage)), any(), isNull())) .willAnswer(withPulledImage(runImage)); Builder builder = new Builder(BuildLog.to(out), docker, null); - BuildRequest request = getTestRequest().withBuilder(ImageReference.of("gcr.io/paketo-buildpacks/builder")); + BuildRequest request = getTestRequest().withBuilder(ImageReference.of("docker.io/paketobuildpacks/builder")); builder.build(request); assertThat(out.toString()).contains("Running creator"); assertThat(out.toString()).contains("Successfully built image 'docker.io/library/my-application:latest'"); @@ -202,14 +202,14 @@ class BuilderTests { Image builderImage = loadImage("image-with-empty-stack.json"); Image runImage = loadImage("run-image.json"); given(docker.image() - .pull(eq(ImageReference.of("gcr.io/paketo-buildpacks/builder:latest")), isNull(), any(), isNull())) + .pull(eq(ImageReference.of("docker.io/paketobuildpacks/builder:latest")), isNull(), any(), isNull())) .willAnswer(withPulledImage(builderImage)); given(docker.image() .pull(eq(ImageReference.of("docker.io/cloudfoundry/run:base-cnb")), eq(ImagePlatform.from(builderImage)), any(), isNull())) .willAnswer(withPulledImage(runImage)); Builder builder = new Builder(BuildLog.to(out), docker, null); - BuildRequest request = getTestRequest().withBuilder(ImageReference.of("gcr.io/paketo-buildpacks/builder")); + BuildRequest request = getTestRequest().withBuilder(ImageReference.of("docker.io/paketobuildpacks/builder")); builder.build(request); assertThat(out.toString()).contains("Running creator"); assertThat(out.toString()).contains("Successfully built image 'docker.io/library/my-application:latest'"); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java index 2f717e44b6..8450d2e510 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java @@ -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. @@ -206,9 +206,9 @@ class DockerApiTests { @Test void pullPullsImageAndProducesEvents() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI createUri = new URI(IMAGES_URL + "/create?fromImage=gcr.io%2Fpaketo-buildpacks%2Fbuilder%3Abase"); - URI imageUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/json"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI createUri = new URI(IMAGES_URL + "/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase"); + URI imageUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json"); given(http().post(eq(createUri), isNull())).willReturn(responseOf("pull-stream.json")); given(http().get(imageUri)).willReturn(responseOf("type/image.json")); Image image = this.api.pull(reference, null, this.pullListener); @@ -221,9 +221,9 @@ class DockerApiTests { @Test void pullWithRegistryAuthPullsImageAndProducesEvents() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI createUri = new URI(IMAGES_URL + "/create?fromImage=gcr.io%2Fpaketo-buildpacks%2Fbuilder%3Abase"); - URI imageUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/json"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI createUri = new URI(IMAGES_URL + "/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase"); + URI imageUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json"); given(http().post(eq(createUri), eq("auth token"))).willReturn(responseOf("pull-stream.json")); given(http().get(imageUri)).willReturn(responseOf("type/image.json")); Image image = this.api.pull(reference, null, this.pullListener, "auth token"); @@ -385,8 +385,8 @@ class DockerApiTests { @Test void inspectInspectImage() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI imageUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/json"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI imageUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json"); given(http().get(imageUri)).willReturn(responseOf("type/image.json")); Image image = this.api.inspect(reference); assertThat(image.getLayers()).hasSize(46); @@ -402,15 +402,15 @@ class DockerApiTests { @Test @SuppressWarnings("removal") void exportLayersWhenExportsIsNullThrowsException() { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); assertThatIllegalArgumentException().isThrownBy(() -> this.api.exportLayerFiles(reference, null)) .withMessage("Exports must not be null"); } @Test void exportLayersExportsLayerTars() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get"); given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export.tar")); MultiValueMap contents = new LinkedMultiValueMap<>(); this.api.exportLayers(reference, (name, archive) -> { @@ -437,8 +437,8 @@ class DockerApiTests { @Test void exportLayersWithSymlinksExportsLayerTars() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get"); given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export-symlinks.tar")); MultiValueMap contents = new LinkedMultiValueMap<>(); this.api.exportLayers(reference, (name, archive) -> { @@ -466,8 +466,8 @@ class DockerApiTests { @Test @SuppressWarnings("removal") void exportLayerFilesDeletesTempFiles() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get"); given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export.tar")); List layerFilePaths = new ArrayList<>(); this.api.exportLayerFiles(reference, (name, path) -> layerFilePaths.add(path)); @@ -477,8 +477,8 @@ class DockerApiTests { @Test @SuppressWarnings("removal") void exportLayersWithNoManifestThrowsException() throws Exception { - ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base"); - URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get"); + ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base"); + URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get"); given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export-no-manifest.tar")); String expectedMessage = "Exported image '%s' does not contain 'index.json' or 'manifest.json'" .formatted(reference); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/type/image-archive-index.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/type/image-archive-index.json index 4369b7ce05..04fbe78552 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/type/image-archive-index.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/type/image-archive-index.json @@ -7,7 +7,7 @@ "size": 529, "annotations": { "containerd.io/distribution.source.gcr.io": "paketo-buildpacks/adoptium", - "io.containerd.image.name": "gcr.io/paketo-buildpacks/adoptium:latest", + "io.containerd.image.name": "docker.io/paketobuildpacks/adoptium:latest", "org.opencontainers.image.ref.name": "latest" } }