Skip to content

Commit 5ed981d

Browse files
committed
Migrate from gcr.io to docker.io for Paketo images
Closes gh-45609
1 parent 09f72da commit 5ed981d

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/dockerTest/java/org/springframework/boot/buildpack/platform/docker/DockerApiIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ class DockerApiIntegrationTests {
3636
@Test
3737
void pullImage() throws IOException {
3838
this.docker.image()
39-
.pull(ImageReference.of("gcr.io/paketo-buildpacks/builder:base"),
39+
.pull(ImageReference.of("docker.io/paketobuildpacks/builder:base"),
4040
new TotalProgressPullListener(new TotalProgressBar("Pulling: ")));
4141
}
4242

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -148,12 +148,12 @@ void buildInvokesBuilderWithDefaultImageTags() throws Exception {
148148
DockerApi docker = mockDockerApi();
149149
Image builderImage = loadImage("image-with-no-run-image-tag.json");
150150
Image runImage = loadImage("run-image.json");
151-
given(docker.image().pull(eq(ImageReference.of("gcr.io/paketo-buildpacks/builder:latest")), any(), isNull()))
151+
given(docker.image().pull(eq(ImageReference.of("docker.io/paketobuildpacks/builder:latest")), any(), isNull()))
152152
.willAnswer(withPulledImage(builderImage));
153153
given(docker.image().pull(eq(ImageReference.of("docker.io/cloudfoundry/run:latest")), any(), isNull()))
154154
.willAnswer(withPulledImage(runImage));
155155
Builder builder = new Builder(BuildLog.to(out), docker, null);
156-
BuildRequest request = getTestRequest().withBuilder(ImageReference.of("gcr.io/paketo-buildpacks/builder"));
156+
BuildRequest request = getTestRequest().withBuilder(ImageReference.of("docker.io/paketobuildpacks/builder"));
157157
builder.build(request);
158158
assertThat(out.toString()).contains("Running creator");
159159
assertThat(out.toString()).contains("Successfully built image 'docker.io/library/my-application:latest'");
@@ -191,12 +191,12 @@ void buildInvokesBuilderWithNoStack() throws Exception {
191191
DockerApi docker = mockDockerApi();
192192
Image builderImage = loadImage("image-with-empty-stack.json");
193193
Image runImage = loadImage("run-image.json");
194-
given(docker.image().pull(eq(ImageReference.of("gcr.io/paketo-buildpacks/builder:latest")), any(), isNull()))
194+
given(docker.image().pull(eq(ImageReference.of("docker.io/paketobuildpacks/builder:latest")), any(), isNull()))
195195
.willAnswer(withPulledImage(builderImage));
196196
given(docker.image().pull(eq(ImageReference.of("docker.io/cloudfoundry/run:base-cnb")), any(), isNull()))
197197
.willAnswer(withPulledImage(runImage));
198198
Builder builder = new Builder(BuildLog.to(out), docker, null);
199-
BuildRequest request = getTestRequest().withBuilder(ImageReference.of("gcr.io/paketo-buildpacks/builder"));
199+
BuildRequest request = getTestRequest().withBuilder(ImageReference.of("docker.io/paketobuildpacks/builder"));
200200
builder.build(request);
201201
assertThat(out.toString()).contains("Running creator");
202202
assertThat(out.toString()).contains("Successfully built image 'docker.io/library/my-application:latest'");

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -166,9 +166,9 @@ void pullWhenListenerIsNullThrowsException() {
166166

167167
@Test
168168
void pullPullsImageAndProducesEvents() throws Exception {
169-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
170-
URI createUri = new URI(IMAGES_URL + "/create?fromImage=gcr.io%2Fpaketo-buildpacks%2Fbuilder%3Abase");
171-
URI imageUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/json");
169+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
170+
URI createUri = new URI(IMAGES_URL + "/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase");
171+
URI imageUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json");
172172
given(http().post(eq(createUri), isNull())).willReturn(responseOf("pull-stream.json"));
173173
given(http().get(imageUri)).willReturn(responseOf("type/image.json"));
174174
Image image = this.api.pull(reference, this.pullListener);
@@ -181,9 +181,9 @@ void pullPullsImageAndProducesEvents() throws Exception {
181181

182182
@Test
183183
void pullWithRegistryAuthPullsImageAndProducesEvents() throws Exception {
184-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
185-
URI createUri = new URI(IMAGES_URL + "/create?fromImage=gcr.io%2Fpaketo-buildpacks%2Fbuilder%3Abase");
186-
URI imageUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/json");
184+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
185+
URI createUri = new URI(IMAGES_URL + "/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase");
186+
URI imageUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json");
187187
given(http().post(eq(createUri), eq("auth token"))).willReturn(responseOf("pull-stream.json"));
188188
given(http().get(imageUri)).willReturn(responseOf("type/image.json"));
189189
Image image = this.api.pull(reference, this.pullListener, "auth token");
@@ -315,8 +315,8 @@ void inspectWhenReferenceIsNullThrowsException() {
315315

316316
@Test
317317
void inspectInspectImage() throws Exception {
318-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
319-
URI imageUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/json");
318+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
319+
URI imageUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json");
320320
given(http().get(imageUri)).willReturn(responseOf("type/image.json"));
321321
Image image = this.api.inspect(reference);
322322
assertThat(image.getLayers()).hasSize(46);
@@ -332,15 +332,15 @@ void exportLayersWhenReferenceIsNullThrowsException() {
332332
@Test
333333
@SuppressWarnings("removal")
334334
void exportLayersWhenExportsIsNullThrowsException() {
335-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
335+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
336336
assertThatIllegalArgumentException().isThrownBy(() -> this.api.exportLayerFiles(reference, null))
337337
.withMessage("Exports must not be null");
338338
}
339339

340340
@Test
341341
void exportLayersExportsLayerTars() throws Exception {
342-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
343-
URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get");
342+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
343+
URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get");
344344
given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export.tar"));
345345
MultiValueMap<String, String> contents = new LinkedMultiValueMap<>();
346346
this.api.exportLayers(reference, (name, archive) -> {
@@ -367,8 +367,8 @@ void exportLayersExportsLayerTars() throws Exception {
367367

368368
@Test
369369
void exportLayersWithSymlinksExportsLayerTars() throws Exception {
370-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
371-
URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get");
370+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
371+
URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get");
372372
given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export-symlinks.tar"));
373373
MultiValueMap<String, String> contents = new LinkedMultiValueMap<>();
374374
this.api.exportLayers(reference, (name, archive) -> {
@@ -396,8 +396,8 @@ void exportLayersWithSymlinksExportsLayerTars() throws Exception {
396396
@Test
397397
@SuppressWarnings("removal")
398398
void exportLayerFilesDeletesTempFiles() throws Exception {
399-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
400-
URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get");
399+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
400+
URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get");
401401
given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export.tar"));
402402
List<Path> layerFilePaths = new ArrayList<>();
403403
this.api.exportLayerFiles(reference, (name, path) -> layerFilePaths.add(path));
@@ -407,8 +407,8 @@ void exportLayerFilesDeletesTempFiles() throws Exception {
407407
@Test
408408
@SuppressWarnings("removal")
409409
void exportLayersWithNoManifestThrowsException() throws Exception {
410-
ImageReference reference = ImageReference.of("gcr.io/paketo-buildpacks/builder:base");
411-
URI exportUri = new URI(IMAGES_URL + "/gcr.io/paketo-buildpacks/builder:base/get");
410+
ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
411+
URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get");
412412
given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export-no-manifest.tar"));
413413
String expectedMessage = "Exported image '%s' does not contain 'index.json' or 'manifest.json'"
414414
.formatted(reference);

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/type/image-archive-index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"size": 529,
88
"annotations": {
99
"containerd.io/distribution.source.gcr.io": "paketo-buildpacks/adoptium",
10-
"io.containerd.image.name": "gcr.io/paketo-buildpacks/adoptium:latest",
10+
"io.containerd.image.name": "docker.io/paketobuildpacks/adoptium:latest",
1111
"org.opencontainers.image.ref.name": "latest"
1212
}
1313
}

0 commit comments

Comments
 (0)