Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-32634

Import of ubuntu:22.04 docker image fails with error

Details

    • NXRM Immortals Sprint 36, NXRM Immortals Sprint 37, NXRM Immortals Sprint 38
    • 3
    • non-concept
    • 3

    Description

      Reproduce steps:

      1. create a proxy repository against dockerhub in 3.39.0
      2. pull ubuntu:22.04 image through the proxy
      3. export the repository to disk
      4. create a hosted docker repository
      5. import the exported repository into it
      6. try to download "/v2/ubuntu/manifests/22.04" through the hosted repository

      This will fail with an error.

      2022-06-03 14:01:05,076-0500 WARN [qtp111228484-125] admin org.sonatype.nexus.repository.docker.internal.V2Handlers - Error: GET /v2/ubuntu/manifests/22.04
      groovy.lang.MissingPropertyException: No such property: manifests for class: org.sonatype.nexus.repository.docker.internal.V2ManifestSchema2
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$NoParamSite.callConstructor(ConstructorSite.java:127)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
      at org.sonatype.nexus.repository.docker.internal.datastore.recipe.V2ManifestUtilImpl.mayDowngrade(V2ManifestUtilImpl.groovy:177)
      at org.sonatype.nexus.repository.docker.internal.datastore.recipe.DockerHostedFacetImpl.getManifestByTag(DockerHostedFacetImpl.java:610)
      at org.sonatype.nexus.repository.docker.internal.DockerHostedFacet$getManifestByTag.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144)
      at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure14.doCall(V2Handlers.groovy:261)

      The manifest that is referenced starts with "manifests" attribute:

      {
          "manifests": [
              {
                  "digest": "sha256:aa6c2c047467afc828e77e306041b7fa4a65734fe3449a54aa9c280822b0d87d",
                  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                  "platform": {
                      "architecture": "amd64",
                      "os": "linux"
                  },
                  "size": 529
              },
      ...
      

      And the image pulls just fine directly using docker. So this is a bug in our code.

      Expected: Nexus Repo should be able to correctly process any image manifest that works with docker.

      Attachments

        Activity

          People

            jhill Joshua Hill
            rseddon Rich Seddon
            Michael Oliverio Michael Oliverio
            NXRM - Optimus
            Joshua Hill Joshua Hill
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              tigCommentSecurity.panel-title