diff --git a/core/src/main/java/org/testcontainers/DockerClientFactory.java b/core/src/main/java/org/testcontainers/DockerClientFactory.java index 5333abe2858..e8846616c85 100644 --- a/core/src/main/java/org/testcontainers/DockerClientFactory.java +++ b/core/src/main/java/org/testcontainers/DockerClientFactory.java @@ -130,7 +130,7 @@ private void checkDiskSpaceAndHandleExceptions(DockerClient client) { private void checkDiskSpace(DockerClient client) { List images = client.listImagesCmd().exec(); - if (!images.stream().anyMatch(it -> asList(it.getRepoTags()).contains("alpine:3.2"))) { + if (!images.stream().anyMatch(it -> it.getRepoTags() != null && asList(it.getRepoTags()).contains("alpine:3.2"))) { PullImageResultCallback callback = client.pullImageCmd("alpine:3.2").exec(new PullImageResultCallback()); callback.awaitSuccess(); }