The copy command should allow tag to be specified when copying to-repo
Describe the problem/challenge you have [A description of the current challenge that you are experiencing.]
Currently I can't specify a tag when using imgpkg copy -i example/image:tag --to-repo repo.example.com/my/image so I need to add the tag after looking up the digest and applying it manually
Describe the solution you'd like [A clear and concise description of what you want to happen. If applicable a visual representation of the UX (ex: new CLI argument name, the behavior expected).]
Either support a :tag suffix for the --to-repo arg or have a separate --tag option
Anything else you would like to add: [Additional information that will assist in solving the issue.]
Also the error message when I included the tag isn't the most helpful:
Error: Building import repository ref: repository can only contain the runes `abcdefghijklmnopqrstuvwxyz0123456789_-./`: trisberg/my-image:my-tag
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this bug fixed as soon as possible" 👎 "There are more important bugs to focus on right now"
We are also happy to receive and review Pull Requests if you want to help fix this issue.
Hi @trisberg!
Thanks for making this issue. I think adding this behavior when copying both bundles and images would be a valuable feature for imgpkg. This is something we have considered in the past, and we did not implement it in v0.3.0 of imgpkg (when we added the copy command). However, since you have provided a use case and created this issue, I believe that is enough of a signal to get the ball rolling on this enhancement.
Just to provide a brief update here. This is a good signal that we have a known limitation of our ability to interact directly with images (rather than bundles). We aren't planning to prioritize this immediately but we will keep this open as a known feature request. We would happily accept contributions for this.
I'm running into friction trying to publish imgpkg bundles to a common repository. In my case, I have a single repository that I have push rights to and need to host multiple bundles. The typical work around to use a distinct repository isn't an option because my access to a registry for this project is quite limited.
We're interested in using imgpkg copy during our release pipeline to move a container from one registry to another while additionally adding a new tag. The image is already tagged with a git commit sha, but would like to semver it based on the tag name.
Something like --tag that could be specified multiple times would do it fantastically.
imgpkg copy -i dev.example.com/project/image:abc123sha --to-repo releases.example.com/project/image --tag v1.0.0 --tag bob
Image would then be pullable:
ctr i pull releases.example.com/project/image:v1.0.0
ctr i pull releases.example.com/project/image:bob
ctr i pull releases.example.com/project/image:abc123sha