imago icon indicating copy to clipboard operation
imago copied to clipboard

Incorrect image name

Open hudec opened this issue 4 years ago • 1 comments

The next code doesn't work in the case the image is from private registry

  •           image := strings.Split(container.Image, ":")[0] + "@" + digest
    

I suggest the following fixup

  •           ss := strings.Split(container.Image, ":")
    
  •           image := ss[0] + "@" + digest
    
  •           if len(ss) > 2 {
    
  •                   image = ss[0] + ":" + ss[1] + "@" + digest
    
  •           }
    

vh

hudec avatar Sep 04 '20 11:09 hudec

Thanks for reporting this ! I think we should use docker.ParseReference() for this.

philpep avatar Sep 04 '20 13:09 philpep