Skip to content

Commit

Permalink
Merge pull request #388 from coveooss/fix/docker-logging
Browse files Browse the repository at this point in the history
Log the ImageList error when it fails
  • Loading branch information
wtrep authored Dec 19, 2022
2 parents 596b20d + 93c6832 commit a669cca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,11 @@ func getImageSummary(imageName string) *types.ImageSummary {
filters := filters.NewArgs()
filters.Add("reference", imageName)
images, err := cli.ImageList(ctx, types.ImageListOptions{Filters: filters})
if err != nil || len(images) != 1 {
if err != nil {
log.Errorf("unable to retrieve image summary of %s: %s", imageName, err.Error())
}

if len(images) != 1 {
return nil
}
return &images[0]
Expand Down

0 comments on commit a669cca

Please sign in to comment.