oras-project / oras

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

Add new commands to support uploading and downloading images #1366

Open qweeah opened 2 months ago

qweeah commented 2 months ago

What is the version of your ORAS CLI

oras v1.1.0

What would you like to be added?

Had an offline discussion with @shizhMSFT and he suggests to add two commands:

Why is this needed for ORAS?

oras cp is not intuitive to use, e.g. user might use oras push to push images from an OCI layout and succeed with false positive (see #1353). Adding those two wrapper commands of oras cp can help avoid that.

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

TerryHowe commented 2 months ago

Why not backup and restore?

On Tue, Apr 23, 2024, 12:31 AM Billy Zha @.***> wrote:

What is the version of your ORAS CLI

oras v1.2.0 What would you like to be added?

Had an offline discussion with @shizhMSFT https://github.com/shizhMSFT and he suggests to add two commands:

  • oras snapshot (alias: dump, backup, pull-image) to support saving an image from remote registry to an OCI image layout.

Usage: oras snapshot [flags] @.***} [:]

  • oras restore (alias: push-image) to support pushing an image from an OCI image layout to remote registry.

Usage: oras restore [flags] @.***} /[:]

Why is this needed for ORAS?

oras cp are not intuitive to uses, e.g. user might use oras push to push images from an OCI layout and succeed with false positive (see #1353 https://github.com/oras-project/oras/issues/1353). Adding those two wrapper commands of oras cp can help avoid that. Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

— Reply to this email directly, view it on GitHub https://github.com/oras-project/oras/issues/1366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZNMMXDTQXO6V6M5ZEACLY6X52ZAVCNFSM6AAAAABGUFNS5WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TQMBVG44TCMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

shizhMSFT commented 2 months ago

Why not backup and restore?

Nice input. I've revised the proposal accordingly to oras backup and marked snapshot as an alias.