Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support <reference> as the digest of manifest #128

Merged
merged 1 commit into from
May 10, 2024

Conversation

shawn111
Copy link
Contributor

@shawn111 shawn111 commented May 9, 2024

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
Copy link
Contributor Author

shawn111 commented May 9, 2024

@termoshtt ocipkg is so great.
I did some patch allow ocipkg can load contain from oci image.
for some cases like comtrya/comtrya#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
Copy link
Contributor Author

@termoshtt termoshtt merged commit 060155a into termoshtt:main May 10, 2024
12 of 14 checks passed
@termoshtt
Copy link
Owner

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.

@termoshtt termoshtt added the add Add new features. label May 10, 2024
termoshtt added a commit that referenced this pull request May 10, 2024
Add escape rule of image name into path for #128 case:

```text
quay.io/jitesoft/alpine:sha256:6755355f801f8e3694bffb1a925786813462cea16f1ce2b0290b6a48acf2500c
```

will escape into

```
quay.io/jitesoft/alpine/__sha256__6755355f801f8e3694bffb1a925786813462cea16f1ce2b0290b6a48acf2500c
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add Add new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants