Details

    • Type: Improvement
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When building a new container using the buildkit feature i.e..:

      DOCKER_BUILDKIT=1 docker build .

      The built image gets stuck in the _uploads folder in Artifactory.

      The config layer of docker cannot be moved to the image folder since in it's content's history section, one of the members does not have the "created" key as follows:
      "history": [
              

      {             "created": "2019-08-20T20:19:55.062606894Z",             "created_by": "/bin/sh -c #(nop) ADD file:fe64057fbb83dccb960efabbf1cd8777920ef279a7fa8dbca0a8801c651bdf7c in / "         }

      ,
              

      {             "created": "2019-08-20T20:19:55.211423266Z",             "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/sh\"]",             "empty_layer": true         }

      ,
      {
                  "created_by": "CMD [\"sh\"]",
                  "comment": "buildkit.dockerfile.v0",
                  "empty_layer": true
              }
          ]
       
      When pushing the image, the following error will be thrown in Artifactory:
       
      2019-10-06 14:14:02,243 [http-nio-8081-exec-2] [INFO ] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:257) - Deploying docker manifest for repo 'buildkit' and tag 'yes' into repo 'docker-local'
      2019-10-06 14:14:02,244 [http-nio-8081-exec-2] [DEBUG] (o.j.r.d.u.DockerUtils:134) - Searching manifest config blob in: 'buildkit/yes/sha256__fc587b796e67f3e4713fbe7752d27a7cf65958da3d80126a747919c8c49f01a5'
      2019-10-06 14:14:02,245 [http-nio-8081-exec-2] [DEBUG] (o.j.r.d.u.DockerUtils:153) - Searching blob in 'buildkit/uploads/sha256_fc587b796e67f3e4713fbe7752d27a7cf65958da3d80126a747919c8c49f01a5'
      2019-10-06 14:14:02,245 [http-nio-8081-exec-2] [DEBUG] (o.j.r.d.u.DockerUtils:155) - Blob found in: 'buildkit/uploads/sha256_fc587b796e67f3e4713fbe7752d27a7cf65958da3d80126a747919c8c49f01a5'
      2019-10-06 14:14:02,252 [http-nio-8081-exec-2] [ERROR] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:783) - Error uploading manifest: 'null'
      2019-10-06 14:14:02,252 [http-nio-8081-exec-2] [DEBUG] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:784) - Error uploading manifest:
      java.lang.NullPointerException: null
      at org.jfrog.repomd.docker.manifest.ManifestSchema2Deserializer.applyAttributesFromContent(ManifestSchema2Deserializer.java:95)
      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:294)
      at org.jfrog.repomd.docker.v2.rest.handler.DockerV2LocalRepoHandler.uploadManifest(DockerV2LocalRepoHandler.java:268)
      at org.artifactory.addon.docker.rest.v2.repo.virtual.DockerV2VirtualRepoHandler.lambda$uploadManifest$5(DockerV2VirtualRepoHandler.java:110)
      at org.artifactory.addon.docker.rest.v2.repo.virtual.DockerV2VirtualRepoHandler.delegateToLocalIfPossible(DockerV2VirtualRepoHandler.java:176)
      at org.artifactory.addon.docker.rest.v2.repo.virtual.DockerV2VirtualRepoHandler.uploadManifest(DockerV2VirtualRepoHandler.java:110)
      at org.jfrog.repomd.docker.v2.rest.DockerV2Resource.uploadManifest(DockerV2Resource.java:81)
      at sun.reflect.GeneratedMethodAccessor504.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
      at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:191)
      at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:97)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:427)
      at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:305)
      at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:208)
      at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:167)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:77)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.artifactory.webapp.servlet.ArtifactoryCsrfFilter.doFilter(ArtifactoryCsrfFilter.java:86)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164)
      at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
      at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:124)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
      at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:304)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
       
      When monitoring the push request using charles, it seems that the push for the v2 scheme fails and the client then pushed using v1 scheme and succeeds.
       
      Steps to reproduce:
      1) Build a docker image using the buildkit.
      2) Push the image to Artifactory.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shaharl Shahar Levy (Inactive)
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: