Skip to content

oras pull --output-archive option #2018

Open

Description

@joshtriplett

What is the version of your ORAS CLI

No response

What would you like to be added?

I'd love to have an oras pull option that retrieves a set of files that are part of a source manifest attached to a container image by hash, and creates a single-file complete corresponding source archive.

Concretely, this could take a form like --output-archive sources.zip or --output-archive sources.tar.zst.

Why is this needed for ORAS?

A single-file complete corresponding source archive is a useful download to provide alongside a container image, or a software executable or package.

Given a container that has associated sources for individual packages in it, storing a full archive doesn't let the OCI store deduplicate individual package sources. Storing a source manifest that references all the individual source archives does, but then retrieving it produces a directory full of source archives, rather than a single file. It's easy enough to zip or tar those up, but:

  1. It'd be helpful to have this support built in,
  2. It'd be nice to not have to materialize the files on disk before archiving them, and
  3. If built in, it could carefully provide reproducible archives that always have the same hash given the same inputs.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Activity

  1. added
    enhancement
    triage
    on Apr 3, 2026
  2. TerryHowe commented on Apr 5, 2026

    @TerryHowe
    Member

    Interesting idea, sounds useful to me, but wonder what other maintainers think.

  3. github-actions commented on Jun 5, 2026

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  4. added
    stale
    on Jun 5, 2026
  5. joshtriplett commented on Jun 8, 2026

    @joshtriplett
    Author

    Obligatory semantically significant sigh at stale bots.

  6. removed
    stale
    on Jun 8, 2026
  7. github-actions commented on Aug 8, 2026

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  8. added
    stale
    on Aug 8, 2026
  9. joshtriplett commented on Aug 11, 2026

    @joshtriplett
    Author

    Still not stale.

  10. TerryHowe commented on Aug 11, 2026

    @TerryHowe
    Member

    There are some experimental commands oras backup and oras restore I think that do something like this. They are seriously restricted in their capabilities as I recall though. I haven't messed with them.

  11. removed
    stale
    on Aug 12, 2026
  12. github-actions commented on Oct 12, 2026

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  13. added
    stale
    on Oct 12, 2026
  14. Mistyheart commented on Nov 6, 2026

    @Mistyheart

    I'd like to work on an initial ZIP implementation of --output-archive: walk the selected artifact metadata, validate and order entry names, and stream verified file contents into one reproducible archive without staging extracted files. I plan to cover named blobs, packed directory layers, platform selection and subjects, while keeping ordinary directory output unchanged. Other archive extensions would report an explicit unsupported-format error in this first change. Tests will cover reproducibility, aliases, invalid paths, corrupt content, and output cleanup. AI tools will assist with the implementation and tests.

  15. removed
    stale
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions