• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Plugin version: 1.7.3
      CloudBees Jenkins Platform - Master 2.107.3.4

      When running image.run() from:

       

      docker.withRegistry(GlobalVariables.DOCKER_PROD_URL, jenkinsSrvAccount) {
          writeFile file: 'Dockerfile', text: "Dockerfile"
          sh "docker build --build-arg http_proxy=${GlobalVariables.FMR_PROXY} -     buildarg https_proxy=${GlobalVariables.FMR_PROXY} -t ${pythonImage} ."
          def image = docker.image("${helmCiImageName}");
          image.run('-u 0:0')
          image.inside('-v $HOME:/root:rw') {
          }
       }

       

      The following error occurs:

       

       
      #8 exporting to image#8 exporting to image#8 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00#8 exporting layers done#8 writing image sha256:234bdfa12f519554df3a5e364ebf03ff0686f73a876d416ce07cbe024f03b792 done#8 DONE 0.0sFATAL: Failed to lookup the docker build ImageID.java.lang.RuntimeException: Failed to lookup the docker build ImageID. at com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:141) at com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:46) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:179) at hudson.model.Build$BuildExecution.doRun(Build.java:157) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1727) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)[BFA] Scanning build for known causes...[BFA] No failure causes found[BFA] Done. 0sFinished: FAILURE
       
      

       

      Performing docker commands using plain docker sh commands works.

       

       

          [JENKINS-66171] Failed to lookup the docker build ImageID

          I encountered this issue when upgrading our linux build agents from docker-ce 20.10.23 to 23.0.0.  It looks like the docker output has changed in version 23.  If this plugin is expecting the output to contain "Successfully built (.*)" and that text is not present any longer, a different mechanism will need to be defined to determine the build status.

          https://github.com/jenkinsci/docker-custom-build-environment-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java#L143

          Shawn Stafford added a comment - I encountered this issue when upgrading our linux build agents from docker-ce 20.10.23 to 23.0.0.  It looks like the docker output has changed in version 23.  If this plugin is expecting the output to contain "Successfully built (.*)" and that text is not present any longer, a different mechanism will need to be defined to determine the build status. https://github.com/jenkinsci/docker-custom-build-environment-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java#L143

          Christoph added a comment -

          I've propsed a PR with a potential fix: https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/80.

          I guess this issue is critical now, with newer docker versions installed.

          Christoph added a comment - I've propsed a PR with a potential fix: https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/80. I guess this issue is critical now, with newer docker versions installed.

          Christoph added a comment -

          Added another PR, with hopefully final code: https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/82

           

          Can anybody look at it and merge/release? That would be awesome.

          Christoph added a comment - Added another PR, with hopefully final code: https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/82   Can anybody look at it and merge/release? That would be awesome.

          Nick added a comment -

          I just want to confirm that this is still an issue with Jenkins 2.426.3, docker-custom-build-environment 1.7.3, and Docker 25.0.3.

          Nick added a comment - I just want to confirm that this is still an issue with Jenkins 2.426.3, docker-custom-build-environment 1.7.3, and Docker 25.0.3.

          Mark Waite added a comment -

          crackerjam the plugin health score of the docker custom build environment plugin is only 76%. It was last released 6 years ago. It needs to be adopted, modernized, tested, and released with the change that was merged in July 2023.

          If your organization needs that functionality, then this is a great chance for you to propose that your organization allow you or someone on your team to resolve your issue and help others at the same time.

          If that's not possible, then you can always download the latest build from the master branch, install it on your controller, and report your results.

          Mark Waite added a comment - crackerjam  the plugin health score of the docker custom build environment plugin is only 76%. It was last released 6 years ago. It needs to be adopted , modernized , tested, and released with the change that was merged in July 2023 . If your organization needs that functionality, then this is a great chance for you to propose that your organization allow you or someone on your team to resolve your issue and help others at the same time. If that's not possible, then you can always download the latest build from the master branch , install it on your controller, and report your results.

          Nick added a comment -

          markewaite I can definitely appreciate that, I just wanted to report that the issue still exists. I'm not an organization, just a single person, and I don't have the skills to implement those changes.

          However, I can report that the latest build you linked does work properly. Thank you for that.

          Nick added a comment - markewaite I can definitely appreciate that, I just wanted to report that the issue still exists. I'm not an organization, just a single person, and I don't have the skills to implement those changes. However, I can report that the latest build you linked does work properly. Thank you for that.

            clanger Christoph
            aalvarezcb Alejandro
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: