-
Notifications
You must be signed in to change notification settings - Fork 85
Description
I've been playing around with skopeo+image-tools+#5+#8 and I've found that almost all of the necessary tooling we need is available. You can pull base images, create layers, validate layers, unpack layers and then run them. That's awesome.
However, the one missing piece is updating image manifests. This is the same as creating manifests (which is also missing). What we need is the ability to take an existing image manifest (or from scratch) change the different properties. While you could do this with some jq foo, since it's a spec thing it should live in the spec repository.
If no-one else is working on this, I'd be glad to help out. I'm thinking of a UX like
% oci-manifest new --cwd /new_cwd --layer baselayer --layer layer2 --layer layer3 >the_manifest.json
% oci-manifest update --cwd /new_cwd --layer layer4 <the_manifest.json >new_manifest.json
Management of history could be quite a pain but we could just implement it as an append operation, with the option to change the base. So something like this would allow you to change the base layer with oci-manifest update:
% oci-manifest update --base-layer baselayer
I'm not too sure, we can hash that out once I have an implementation. It might be nice to also extend this tool to handle manifest-lists. But that's for a future date, maybe we could implement it as part of oci-refs where we add features to deref a manifest list. Not sure.