Skip to content

Add new commands to support uploading and downloading images #1366

@qweeah

Description

@qweeah

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:

  • oras backup (alias: snapshot, pull-image) to support saving an image from remote registry to an OCI image layout tar archive.
Usage:
  oras backup --output <oci_layout_path> <reg>/<repo>[{:<tag>|@digest]}] [...]
  • oras restore (alias: push-image) to support pushing an image from an OCI image layout tar archive to remote registry.
Usage:
  oras restore --output <reg>/<repo> <oci_layout_path>[{:<tag>|@digest]}]

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?

  • Yes, I am willing to implement it.

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already existsenhancementNew feature or requestspec requiredIssues that require specifications

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions