Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-5212

Quay 3.8.1 can't mirror OCI images from Docker Hub

XMLWordPrintable

    • Critical

      If you create a mirror repository with

      External Repository: docker.io/library/ubuntu
      Tags: latest

      the sync fails with:

      time="2023-03-16T09:50:38Z" level=fatal msg="Uploading manifest list failed, attempted the following formats: application/vnd.oci.image.index.v1+json(uploading manifest latest to quay.example.de/library/ubuntu: received unexpected HTTP status: 500 Internal Server Error), application/vnd.docker.distribution.manifest.list.v2+json(uploading manifest latest to quay.example.de/library/ubuntu: manifest invalid: manifest invalid)"

      Attached the Traceback from the logs.
      The relevant error messages in the Traceback are:

      jsonschema.exceptions.ValidationError: 'application/vnd.oci.image.manifest.v1+json' is not one of ['application/vnd.docker.distribution.manifest.v2+json', 'application/vnd.docker.distribution.manifest.v1+json']
      
      image.docker.schema2.list.MalformedSchema2ManifestList: manifest data does not match schema: 'application/vnd.oci.image.manifest.v1+json' is not one of ['application/vnd.docker.distribution.manifest.v2+json', 'application/vnd.docker.distribution.manifest.v1+json']

      This is because the Docker Hub Ubuntu images recently changed to OCI images:
      https://github.com/docker-library/official-images/issues/14025

      The mediaType changed from

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

      to

      application/vnd.oci.image.index.v1+json
      application/vnd.oci.image.manifest.v1+json

      The manifest from an older image:

      $ docker manifest inspect docker.io/ubuntu:jammy-20221130
      {
         "schemaVersion": 2,
         "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
         "manifests": [
            {
               "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
               "size": 529,
               "digest": "sha256:965fbcae990b0467ed5657caceaec165018ef44a4d2d46c7cdea80a9dff0d1ea",
               "platform": {
                  "architecture": "amd64",
                  "os": "linux"
               }
            },
            {
               "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
               "size": 529,
               "digest": "sha256:ea8f467d512068a1e52494d5b2d959a9307a35682633d0b5d481e79c914c627f",
               "platform": {
                  "architecture": "arm",
                  "os": "linux",
                  "variant": "v7"
               }
            },
            {
               "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
               "size": 529,
               "digest": "sha256:e77aa65a8a2bccbc47b96b4256995dd7ff447024ed5319527040f7cc465f6511",
               "platform": {
                  "architecture": "arm64",
                  "os": "linux",
                  "variant": "v8"
               }
            },
            {
               "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
               "size": 529,
               "digest": "sha256:48d0b40359f8789f1c5d6065bf0d2a00c8d0d4913ac61670215b2debedd483e6",
               "platform": {
                  "architecture": "ppc64le",
                  "os": "linux"
               }
            },
            {
               "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
               "size": 529,
               "digest": "sha256:f31546bc71659c643837d57f09a161f04e866b59da4f418e064082a756c4c23a",
               "platform": {
                  "architecture": "riscv64",
                  "os": "linux"
               }
            },
            {
               "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
               "size": 529,
               "digest": "sha256:4e3c33035b808801fc84ba48d5a779cd572167956f5123d846d7e1cbafe9e785",
               "platform": {
                  "architecture": "s390x",
                  "os": "linux"
               }
            }
         ]
      } 

      The manifest from the latest image:

      $ docker manifest inspect docker.io/ubuntu:latest
      {
         "schemaVersion": 2,
         "mediaType": "application/vnd.oci.image.index.v1+json",
         "manifests": [
            {
               "mediaType": "application/vnd.oci.image.manifest.v1+json",
               "size": 424,
               "digest": "sha256:7a57c69fe1e9d5b97c5fe649849e79f2cfc3bf11d10bbd5218b4eb61716aebe6",
               "platform": {
                  "architecture": "amd64",
                  "os": "linux"
               }
            },
            {
               "mediaType": "application/vnd.oci.image.manifest.v1+json",
               "size": 424,
               "digest": "sha256:ad18cfdb19dac67bf0072dacea661a817330e5c955d081f4d09914e743ae5d4a",
               "platform": {
                  "architecture": "arm",
                  "os": "linux",
                  "variant": "v7"
               }
            },
            {
               "mediaType": "application/vnd.oci.image.manifest.v1+json",
               "size": 424,
               "digest": "sha256:537da24818633b45fcb65e5285a68c3ec1f3db25f5ae5476a7757bc8dfae92a3",
               "platform": {
                  "architecture": "arm64",
                  "os": "linux",
                  "variant": "v8"
               }
            },
            {
               "mediaType": "application/vnd.oci.image.manifest.v1+json",
               "size": 424,
               "digest": "sha256:f23b7ade9f88f91c8d5932a48b721712ed509a607d9a05cdeae4cd06de09e5f7",
               "platform": {
                  "architecture": "ppc64le",
                  "os": "linux"
               }
            },
            {
               "mediaType": "application/vnd.oci.image.manifest.v1+json",
               "size": 424,
               "digest": "sha256:b351315d950a4da70f19d62f4da5dd7f9a445eb8c8d6851a5b6cdddbdafb13cf",
               "platform": {
                  "architecture": "s390x",
                  "os": "linux"
               }
            }
         ]
      } 

      As noted in https://github.com/docker-library/official-images/issues/14025#issuecomment-1420018250:

      Over time, all of the official images will be moving to OCI media types (application/vnd.oci.*) instead of the current Docker media types (application/vnd.docker.*). 

      it is expected that other images will also change to OCI images on Docker Hub and then can't be synced with quay.

        1. image-2023-11-02-13-59-14-348.png
          504 kB
          luffy zhang
        2. image-2023-11-02-14-00-26-359.png
          289 kB
          luffy zhang
        3. quay-traceback.txt
          11 kB
          Christian Loos

              rhn-support-ibazulic Ivan Bazulic
              chr.loos Christian Loos (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: