termoshtt / ocipkg

An OCI registry client for Rust desiged to use distribute static library as a "container"
Apache License 2.0
48 stars 8 forks source link

Support `<reference>` as the digest of manifest #128

Closed shawn111 closed 5 months ago

shawn111 commented 5 months ago

In https://github.com/opencontainers/distribution-spec/blob/main/spec.md

<reference> MUST be either (a) the digest of the manifest or (b) a tag

This PR is add support for the case of (a) the digest of the manifest.

example:

ocipkg get quay.io/jitesoft/alpine:sha256:6755355f801f8e3694bffb1a925786813462cea16f1ce2b0290b6a48acf2500c
shawn111 commented 5 months ago

@termoshtt ocipkg is so great. I did some patch allow ocipkg can load contain from oci image. for some cases like https://github.com/comtrya/comtrya/issues/314.

Not sure what do you think about it. Currently, ocipkg still missing something like:

  1. get_image or pull_image into specific dir
  2. handle imageindex
  3. handle the digest of manifest as (this PR)

Those are small patches, I would updated them later.

shawn111 commented 5 months ago

fixed https://github.com/termoshtt/ocipkg/actions/runs/9017870315/job/24802842566

termoshtt commented 5 months ago

Thanks PR.

get_image or pull_image into specific dir

Sounds good. It would be better to create a new API next to Artifact::unpack like unpack_on.