Skip to content

tools: need a tool to update/create manifests #59

@cyphar

Description

@cyphar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions