Skip to content

Commit

Permalink
Merge pull request #201 from kunickiaj/tags_npe
Browse files Browse the repository at this point in the history
Fix NPE when host has untagged images.
  • Loading branch information
rnorth committed Aug 15, 2016
2 parents 10b2673 + a291291 commit 0c19d3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private void checkDiskSpaceAndHandleExceptions(DockerClient client) {
private void checkDiskSpace(DockerClient client) {

List<Image> 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();
}
Expand Down

0 comments on commit 0c19d3f

Please sign in to comment.