From 64d48b70c237f450fba4d09a01a85e49fe3098e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20m=C3=A5s=C3=A9n?= Date: Fri, 13 Nov 2020 21:19:08 +0100 Subject: [PATCH] fix: return nil imageinfo when retrieve fails (#680) --- pkg/container/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/container/client.go b/pkg/container/client.go index eb0bb5f..dea982f 100644 --- a/pkg/container/client.go +++ b/pkg/container/client.go @@ -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