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 manifest list #27

Closed
thomasgouveia opened this issue Feb 21, 2022 · 2 comments · Fixed by #67
Closed

Support manifest list #27

thomasgouveia opened this issue Feb 21, 2022 · 2 comments · Fixed by #67

Comments

@thomasgouveia
Copy link

thomasgouveia commented Feb 21, 2022

Hello,

First, thanks for your work on this crate, it is very helpful!

I'm interested in the manifest list feature. Currently, I work on a crate to provide the ability to pull OCI images for a school project. So I need to be able to pull for example alpine or ubuntu images from docker.io/library.

For example, when I use the pull_manifest_and_config method of your Client, I have this error :

unsupported media type: application/vnd.docker.distribution.manifest.list.v2+json

I checked your code and I see that the crates do not support the manifest list feature. Is this something under consideration? I see there is a TODO in your code, but no more information about future implementation. If not, did you know if there is a workaround to be able to pull those images?

Thank you!

Thomas

@bacongobbler
Copy link
Contributor

Hi @thomasgouveia. Have you had a chance to look at the PR queue? I see #26 attempts to resolve some use cases with manifest lists.

I’m curious to hear what issues you’re seeing and what features you’d like to see made available.

@thomasgouveia
Copy link
Author

Yes, I've looked #26, but I'm not sure it resolves my use case. #26 is focused on the ability to push manifest lists, and not on pulling. What I'm interested in is the ability to pull images such as docker.io/library/alpine or docker.io/library/ubuntu.

To give you an idea, currently, with this piece of code :

pub async fn pull_manifest(&mut self) -> Result<(OciManifest, String, String)> {
  self.client
      .pull_manifest_and_config(&self.reference, &self.auth)
      .await
      .map_err(|e| Error::PullManifest(e.to_string()))?
}

When my reference is parsed from docker.io/library/ubuntu, I have the following error :

unsupported media type: application/vnd.docker.distribution.manifest.list.v2+json

So that's ok, as I said in my first comment.

But it is strange, because if I use docker.io/amd64/ubuntu, it works great.

I'm not sure to understand the difference between those two OCI references, and how the process has to be different for each.

arronwy added a commit to arronwy/oci-distribution that referenced this issue Mar 13, 2023
Manifests list feature in oci-distribution is already
implemented, default image in docker.io like busybox
use IMAGE_MANIFEST_LIST_MEDIA_TYPE, but ubuntu image
use OCI_IMAGE_INDEX_MEDIA_TYPE.

Fixes: oras-project#27

Signed-off-by: Wang, Arron <arron.wang@intel.com>
arronwy added a commit to arronwy/oci-distribution that referenced this issue Mar 13, 2023
Manifests list feature in oci-distribution is already
implemented, default image in docker.io like busybox
use IMAGE_MANIFEST_LIST_MEDIA_TYPE, but ubuntu image
use OCI_IMAGE_INDEX_MEDIA_TYPE.

Fixes: oras-project#27

Signed-off-by: Wang, Arron <arron.wang@intel.com>
arronwy added a commit to arronwy/oci-distribution that referenced this issue Mar 17, 2023
Manifests list feature in oci-distribution is already
implemented, default image in docker.io like busybox
use IMAGE_MANIFEST_LIST_MEDIA_TYPE, but ubuntu image
use OCI_IMAGE_INDEX_MEDIA_TYPE.

Fixes: oras-project#27

Signed-off-by: Wang, Arron <arron.wang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants