Skip to content

Commit d7bcde6

Browse files
committed
Don't try to pull reserved scratch image during build
1 parent 6ba01b7 commit d7bcde6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.0.2
2+
* Don't try to pull reserved ``scratch`` image during build
3+
14
# 2.0.1
25
* Improve matching in ``DockerfileCOPYParentsEmulator`` #134
36
* Now should properly handle ``./``

testcontainers-advanced-imagebuilder/src/main/java/software/xdev/testcontainers/imagebuilder/AdvancedImageFromDockerFile.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ protected void prePullDependencyImages(final Set<String> imagesToPull)
448448
{
449449
imagesToPull
450450
.stream()
451+
.filter(this::canImageNameBePulled)
451452
.map(imageName -> CompletableFuture.runAsync(() -> {
452453
try
453454
{
@@ -472,6 +473,12 @@ protected void prePullDependencyImages(final Set<String> imagesToPull)
472473
.forEach(CompletableFuture::join);
473474
}
474475

476+
protected boolean canImageNameBePulled(final String imageName)
477+
{
478+
// scratch is reserved
479+
return !"scratch".equals(imageName);
480+
}
481+
475482
protected Logger log()
476483
{
477484
return LOGGER;

0 commit comments

Comments
 (0)