Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support copy of images and associated references #29

Closed
6 tasks
sajayantony opened this issue Sep 22, 2021 · 5 comments
Closed
6 tasks

Support copy of images and associated references #29

sajayantony opened this issue Sep 22, 2021 · 5 comments
Assignees
Milestone

Comments

@sajayantony
Copy link
Contributor

sajayantony commented Sep 22, 2021

The current copy implementation moves a source artifact to a target. The library needs to support moving references to support the following options

  • copy all references and graph of objects
  • Filter references through matching a given artifacType e.g. artifactType=sbom/example
  • Support excluding references of a given artifact type
  • Support filter through matching annotation
  • support excluding artifacts with specified annotation
  • support tag update deferment where the source artifact and references are copied by digests, then the tag is applied as the last step. This supports adding a signature to the source, and it's the only new thing that must be copied and put in sync

Examples

  • Copy with specific references, included

    oras cp registry.wabbit-networks.io/net-monitor:v1 \
      registry.acme-rockets.io/library/net-monitor:v1 \
      -r \
      -m application/vnd.cncf.notary.v2 \
      -m sbom/example
  • Copy with specific references, excluded

    oras cp registry.wabbit-networks.io/net-monitor:v1 \
      --destination registry.acme-rockets.io/library/net-monitor:v1 \
      -r \
      -x sbom/example
  • Copy with specific references, included, filtered by annotation (inclusion)

    oras cp registry.wabbit-networks.io/net-monitor:v1 \
      -r \
      -m application/vnd.cncf.notary.v2 \
      --match-annotation "org.cncf.notary.v2.signature.subject=acme-rockets.io"
  • Copy with specific references, included, filtered by annotation (exclusion)

    oras cp registry.wabbit-networks.io/net-monitor:v1 \
      -r \
      -m application/vnd.cncf.notary.v2 \
      --exclude-annotation "org.cncf.notary.v2.signature.subject=wabbit-networks.io"
@juliusl
Copy link

juliusl commented Sep 22, 2021

--match-annotation does this imply pattern matching i.e. regex filter?

@sajayantony
Copy link
Contributor Author

From a library perspective I think enabling regex/re2 support might all that is needed. CLI and other consumers can decided to expose or hide the complexity of accepting just strings or raw patterns.

@sajayantony
Copy link
Contributor Author

CLI issue is captured here - oras-project/oras#307

@Wwwsylvia
Copy link
Member

@shizhMSFT
Copy link
Contributor

Closing as tracked by #201 and #203

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants