Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.39.0
-
NXRM Immortals Sprint 36, NXRM Immortals Sprint 37, NXRM Immortals Sprint 38
-
3
-
non-concept
-
3
Description
Reproduce steps:
- create a proxy repository against dockerhub in 3.39.0
- pull ubuntu:22.04 image through the proxy
- export the repository to disk
- create a hosted docker repository
- import the exported repository into it
- 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.