-
Notifications
You must be signed in to change notification settings - Fork 787
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
support for oras-like sugar #5091
Comments
Just came out of a call with @baude working in this area. In general, I think it would be great to provide means to create OCI artifacts more easily. I am under the impression that you're looking more into creating artifacts (since copying them is already supported by Skopeo). In that case, I think that Buildah is probably a better home for that functionality. Or even extending umoci? |
@nalind is also looking into SBOMs and artifacts at the moment AFAIR. |
Not opposed to buildah for this functionality; feels like it can go either way? In theory skopeo is more about inspection/copying, but OTOH this desired functionality is very close to "copying" too. There's no "containerization" involved here (namespaces, cgroups, overlayfs, etc etc.), it's just wrapping files in JSON. Restating the above, one dividing line here is that IMO at a technical level this does not involve containers/storage and eventually I think it could make sense to drop the vendored copy of containers/storage out of skopeo and have it defer to the installed buildah/podman binary for that. As far as umoci, today it's not shipped in RHEL and I'd definitely like something that is for this. |
For me, the primary boundary is: Skopeo should not be in the business of editing blob contents. That’s clearly what Buildah is, for container layers. In that sense, a “push an artifact with these raw blobs” (creating just a manifest) is close but probably on the “reasonable to include” side. (It’s not that easy as the example shows… At least every blob needs a MIME type specified.) Apart from Now, Buildah is designed around c/storage and storing data in layers there; storing other arbitrary large blobs in c/storage is possible but I’m not sure it’s wanted; there’s not that much obvious benefit and the locking required by c/storage might mean that dealing with large artifacts could slow down otherwise unrelated pulls/pushes/container starts in the same store. So I can vaguely imagine that Buildah, as it exists right now, might not actually be the best answer either, and maybe Skopeo could be the place.
c/storage in Skopeo is one of those things that is useless and inconvenient 99% of the time (notably its dependencies are one of the stronger reasons we can’t provide a single static Skopeo binary that runs on all distributions, something a class of users wants) — and then very useful in rare support cases. My wish is that every single caller of |
Right, that was my sense too. SyntaxI guess regardless of whether it goes in skopeo or buildah (mostly) - any opinions on syntax? Pushing
and Unlike oras we make the mime type required, because skopeo already has commands for pushing OCI images. Pulling
No new command! This already exists and works.
This will write the contents of
Assuming that there is only one referenced blob, extract it to stdout. Both of these commands would take
It's definitely unwanted; use cases here include e.g. storing |
Maybe something like
with
|
Yeah, true. Agree it's unclean. Has it been a problem in practice though?
My main concern with this is that usually arguments aren't positionally sensitive, it should be equivalent to specify them as Dunno. Probably not a big deal. Hmm, I think a
hmm, in the general case we may want support for accepting separate local filenames and remote I'm OK with having separate arguments; visually noisier but in the end I expect most usage of this is from scripts or at worst humans copy/pasting instructions. (Also the use cases I primarily care about have exactly one layer, in which case the argument ordering doesn't matter)
Key metadata in the manifest: version aka |
containers/podman#489 (internal) containers/podman#18673 (external reporter), at least.
Yes. I don’t know that there is another trivial ergonomic solution… eventually we might end up accepting a JSON input, which clearly works but also takes a lot of pleasure out of using the tool. …
… oh, look a non-trivial solution :) That looks promising. The trivial version would require specifying the MIME type on every argument, but special-casing
I’m not sure what you mean. Should this create a side image using the OCI referrers mechanism? (That, to me feels like a separate subcommand, and anyway c/image can’t currently do that.) Or is it just an annotation string?
At least for … I feel very weakly about |
Buildah has already a hidden set of commands (see But I'd prefer to move the details of the design into a separate design doc/proposal/pr. May that be an |
That makes sense to me, I don't see us having to lock everything into containers/storage for buildah. Creating and assembling manifests and pushing them to a container/registry seems like a legitimate use case. |
That = carrying this in buildah or carrying it in skopeo?
Yes, oras has
oras does this by default; I think it makes sense, but clearly needs to be overridable too. |
buildah support. I think skopeo might changing what the tool does. |
(transferred this issue to buildah) |
FWIW ( not directly related ) better support to push OCI artifacts is also needed so its easier to ship WASM modules ( for which podman is currently using scratch based OCI images ) if it becomes easier to work with artifacts, I think podman should switch to artifacts to ship |
A friendly reminder that this issue had no activity for 30 days. |
xref CentOS/centos-bootc-layered#21 (comment) One thing that got slightly lost here is that even if we choose |
Not sure podman has any better support for fetching the buildah pull, but definitely better for running containers. |
I ran across |
I recently came across https://github.com/carvel-dev/imgpkg - definitely related and interesting. |
As far as I can tell, generally the core
skopeo copy
workflow is functional when using OCI artifacts. However, operating on artifacts is clunky; the most ergonomic way is to fetch into anoci
directory and then parse the content (and if you just wanted the data, delete the temporary oci dir). For uploads it requires e.g. creating content in a localoci
directory e.g. and then pushing to a registry.The ORAS project has much nicer higher level sugar; especially things like oras push:
oras push --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt
is quite nice.
WDYT about adding some commands like this to skopeo?
The text was updated successfully, but these errors were encountered: