zot: sync on-demand: `docker pull` fails for OCI image index(application/vnd.oci.image.index.v1+json)

Discussed in https://github.com/project-zot/zot/discussions/2811

<div type='discussions-op-text'>

Originally posted by tamilhce November 28, 2024 I was running zot with following patch version https://github.com/tamilhce/zot/pull/13/ as a pull through for ECR

I have verified that some multi-arch images are working as expected, while others are not. Upon further investigation, I found that container multi-arch images with the type application/vnd.oci.image.index.v1+json (the OCI manifest list for multi-platform images) are not supported. Only multi-arch images with the Docker manifest format, application/vnd.docker.distribution.manifest.list.v2+json (the Docker manifest list for multi-platform images), are supported.

AWS ECR supports both the OCI and Docker manifest formats, whereas Zot only supports the multi-arch/image index of the Docker manifest format.

working - application/vnd.docker.distribution.manifest.list.v2+json

vanan@a-a7ehvnb8bz4k ~> docker manifest inspect xxxx.dkr.ecr.us-east-1.amazonaws.com/xxxx:v1.31.0-1.31.0
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 921,
         "digest": "sha256:8afaacbf5f90e424d6e70b5ffdc2447112c58031e830e994142fc500064a200f",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 921,
         "digest": "sha256:308b87952a99f44281fadcd7a490b7e8a7cbbb4d3c672ecb417a9b4064a6a316",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }
   ]
}


vanan@a-a7ehvnb8bz4k ~> docker pull zot-dev.xxx.net/xxxxx:v1.31.0-1.31.0
v1.31.0-1.31.0: Pulling from xxxxx
Digest: sha256:ca04f21bc8fcc278acb9bb4f08e359603d3b18da4384822c11e2771480d52a2b
Status: Image is up to date for zot-dev.xxx.net/xxxx:v1.31.0-1.31.0
zot-dev.xxx.net/xxxx:v1.31.0-1.31.0

Not working - application/vnd.oci.image.index.v1+json

vanan@xxxxx ~> docker manifest inspect xxxxxxx.dkr.ecr.us-east-1.amazonaws.com/xxxxxx:xxxxx
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.oci.image.index.v1+json",
   "manifests": [
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 4841,
         "digest": "sha256:eea456504e848927b80b42427a2b466e25f7ddc226d18765912936001fda6288",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 4843,
         "digest": "sha256:5a6a7e7e93c854dc0f7df8c4ee669c3ba4a30bee27362bb194ba1defbbcb1409",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }
   ]
}


vanan@a-a7ehvnb8bz4k ~> docker pull zot-dev.xxx.net/xxxxx:xxxxx
Error response from daemon: repository zot-dev.xxx.net/xxxxx not found: name unknown: repository name not known to registry


relevant zot container error log 
{"level":"info","repo":"xxxx/xxxxx","xxxxx":"reference","err":"media type is not supported

is this the expected behavior? If it’s a bug, I will work on the feature. Looking forward to your valuable reply.</div>

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 34 (33 by maintainers)

Most upvoted comments

Hi @andaaron, Due to family medical reasons, I have not been working for the past couple of weeks. I might need to extend this for another one or two weeks. Once I return, we can connect, or I will share the reproducer with you to move things forward.