fix: return nil imageinfo when retrieve fails (#680)

pull/683/head
nils måsén 4 years ago committed by GitHub
parent 30b51c4b45
commit 64d48b70c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,6 +122,7 @@ func (client dockerClient) GetContainer(containerID string) (Container, error) {
imageInfo, _, err := client.api.ImageInspectWithRaw(bg, containerInfo.Image)
if err != nil {
log.Warnf("Failed to retrieve container image info: %v", err)
return Container{containerInfo: &containerInfo, imageInfo: nil}, nil
}
return Container{containerInfo: &containerInfo, imageInfo: &imageInfo}, nil

Loading…
Cancel
Save