Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-21198

Docker Push on image with Foreign Layers fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docker
    • Labels:
      None
    • Severity:
      Medium
    • Requirement Status:

      UNCOVERED

      Description

      While a normal "docker push" will cause a "Skipping foreign layers" message on proprietary images (E.G. windows/nanoserver from mcr.microsoft.com), there is a Docker option that bypasses this skip. Even bypassing the skip Artifactory does not accept the upload.

      Steps to reproduce:

      1. Set up a Docker local repository

      In a Windows OS:

      1. Do a "docker pull" on mcr.microsoft.com/windows/nanoserver:10.0.14393.953
      2. Do a "docker tag" so it can be pushed to Artifactory
      3. Add the flag "allow-nondistributable-artifacts":["<ART_URL>"] to the Docker's daemon.json file - reboot the daemon to apply
      4. Attempt a docker push to Artifactory, receive a "manifest invalid" error

       

      On the backend, Artifactory throws a 400 HTTP error with these error lines - I suspect it can't handle the funny foreign layers manifest.json format:

       

      2020-02-04 22:21:28,493 [http-nio-8081-exec-1] [ERROR] (o.j.r.d.m.ManifestSchema2Deserializer:133) - ManifestSchema2Deserializer CIRCUIT BREAKER: 5000 Iterations ware performed breaking operation.

      Manifest: {

         "schemaVersion": 2,

         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",

         "config":

      {       "mediaType": "application/vnd.docker.container.image.v1+json",       "size": 582,       "digest": "sha256:18a0d32a4b98e8a3e1ab7eb33b2be75b4826cbf43754961db08101b52bce0840"    }

      ,

         "layers": [

           

      {          "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",          "size": 259260404,          "digest": "sha256:4797ee8f7d169ca98bb466b06594b299a17e9483a9021d50d35f10a2a4f844bb"       }

      ,

           

      {          "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",          "size": 118165952,          "digest": "sha256:bb5b3d0611aa1e66908c365c5a22ed43173d6a2a4f38d3c292ef17a2a44bb0a6"       }

         ]

      }

      jsonBytes:{"config":

      {"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["c:\\windows\\system32\\cmd.exe"],"Image":"","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null}

      ,"created":"2017-03-08T08:52:53.2940846-08:00","os":"windows","os.version":"10.0.14393.953","rootfs":{"type":"layers","diff_ids":["sha256:6c357baed9f5177e8c8fd1fa35b39266f329535ec8801385134790eb08d8787d","sha256:75c873eec901cd63e8989874fe2a8056354876ffd7e877d3e3216d3edbf70f94"]}}

      2020-02-04 22:21:28,494 [http-nio-8081-exec-1] [ERROR] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:822) - Error uploading manifest: 'Circuit Breaker Threshold Reached, Breaking Operation. see log output for manifest details.'

      2020-02-04 22:21:28,505 [http-nio-8081-exec-1] [DEBUG] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:823) - Error uploading manifest:

      java.lang.IllegalArgumentException: Circuit Breaker Threshold Reached, Breaking Operation. see log output for manifest details.

      at org.jfrog.repomd.docker.manifest.ManifestSchema2Deserializer.breakeCircuit(ManifestSchema2Deserializer.java:134)

      at org.jfrog.repomd.docker.manifest.ManifestSchema2Deserializer.checkCircuitBreaker(ManifestSchema2Deserializer.java:124)

      at org.jfrog.repomd.docker.manifest.ManifestSchema2Deserializer.applyAttributesFromContent(ManifestSchema2Deserializer.java:107)

      at org.jfrog.repomd.docker.manifest.ManifestSchema2Deserializer.deserialize(ManifestSchema2Deserializer.java:42)

      at org.jfrog.repomd.docker.manifest.ManifestDeserializer.deserialize(ManifestDeserializer.java:32)

      at org.jfrog.repomd.docker.v2.rest.handler.DockerV2LocalRepoHandler.processUploadedManifestType(DockerV2LocalRepoHandler.java:301)

      at org.jfrog.repomd.docker.v2.rest.handler.DockerV2LocalRepoHandler.uploadManifest(DockerV2LocalRepoHandler.java:275)

      at org.jfrog.repomd.docker.v2.rest.DockerV2Resource.uploadManifest(DockerV2Resource.java:81)

        Attachments

          Forms

            Activity

                People

                Assignee:
                Unassigned
                Reporter:
                patrickr Patrick Russell
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    PagerDuty