|
|
@@ -74,9 +74,13 @@ public class DockerService {
|
|
|
return docker.psAll().stream().map(inspectContainerResponse -> {
|
|
|
String imageId = inspectContainerResponse.getImageId();
|
|
|
Image image = imageMap.get(imageId);
|
|
|
+ if (image == null) {
|
|
|
+ log.error("container {}'s imageId {} not found" , inspectContainerResponse.getId(), imageId);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
String repoTag = image.getRepoTags().length > 0 ? image.getRepoTags()[0] : "<none>:<none>";
|
|
|
return new DockerContainer(inspectContainerResponse, repoTag);
|
|
|
- }).collect(Collectors.toList());
|
|
|
+ }).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
public void handleDockerContainer(String ops, String containerId) {
|