Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect image name #18

Open
hudec opened this issue Sep 4, 2020 · 1 comment
Open

Incorrect image name #18

hudec opened this issue Sep 4, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@hudec
Copy link

hudec commented Sep 4, 2020

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

@philpep philpep added the bug Something isn't working label Sep 4, 2020
@philpep
Copy link
Owner

philpep commented Sep 4, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants