oras-project / oras

OCI registry client - managing content like artifacts, images, packages
https://oras.land
Apache License 2.0
1.43k stars 173 forks source link

Support customizing file name in oras pull #1159

Open FeynmanZhou opened 10 months ago

FeynmanZhou commented 10 months ago

What is the version of your ORAS CLI

v1.1.0

What would you like to be added?

Currently, oras pull saves the artifact with the name of the file that is stored in the annotations of the manifest. However, this makes it hard to find the file after pulling the file to local since users will need to go figure out what the annotation is and search for the file name, eventually find the file with the annotation as a reference. This is really cumbersome for users or for machines to find a pulled file.

In some cases, if the artifact that has multiple layers, we need to provide an option that allows to give file names to multiple pulled files. We will need to define the flags and experience to cover sing-layer and multi-layer scenarios.

Why is this needed for ORAS?

It would be much convenient if there is an option that points to a file (instead of a folder) and save the file with a given name, so users can easily find and use the pulled file for other operations later. This will be efficient and helpful in the automation or CI/CD scenario.

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

qweeah commented 10 months ago

Putting it to future to avoid being marked as stale.

qweeah commented 10 months ago

This looks similar to https://github.com/oras-project/oras/issues/346. +@ndeloof who helped raise the issue.

FeynmanZhou commented 10 months ago

Maintainers suggested moving this issue to v1.3.0 milestone per discussion on Nov 7, 2023