Merge pull request #310 from dougwettlaufer/docker-metrics-no-repo

Handle listing docker images without repo tags
This commit is contained in:
Jonathan Shook 2021-04-28 11:58:02 -05:00 committed by GitHub
commit ff591c4cf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,6 +228,10 @@ public class DockerHelper {
List<String> validRepoTags = tags.stream().map(s -> label + ":" + s).collect(Collectors.toList());
for (Image image : images) {
String[] foundRepoTags = image.getRepoTags();
if (foundRepoTags == null) {
continue;
}
for (String foundRepoTag : foundRepoTags) {
for (String validRepoTag : validRepoTags) {
if (foundRepoTag.equals(validRepoTag)) {