Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45868

CloudBees Docker Custom Build Environment Plugin gives docker command not found error

XMLWordPrintable

      I have setup my jenkins server and installed `CloudBees Docker Custom Build Environment Plugin`. And I configured the job to use this plugin to run my build steps inside a docker container. 

       

      when I run this build I get below error on the console log:

       

      ```
      09:53:40 > git config core.sparsecheckout # timeout=10*09:53:40* > git checkout -f 3550782d866867c1de1f43b2a5fe2ef5c4b9ff26*09:53:40* > git rev-list 3550782d866867c1de1f43b2a5fe2ef5c4b9ff26 # timeout=10*09:53:40* FATAL: Cannot run program "docker": error=2, No such file or directory*09:53:40* java.io.IOException: error=2, No such file or directory*09:53:40* at java.lang.UNIXProcess.forkAndExec(Native Method)09:53:40 at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)09:53:40 at java.lang.ProcessImpl.start(ProcessImpl.java:134)09:53:40 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)09:53:40 at hudson.Proc$LocalProc.<init>(Proc.java:245)09:53:40 at hudson.Proc$LocalProc.<init>(Proc.java:214)09:53:40 at hudson.Launcher$LocalLauncher.launch(Launcher.java:850)09:53:40 at hudson.Launcher$ProcStarter.start(Launcher.java:384)09:53:40 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1195)09:53:40 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1160)09:53:40 at hudson.remoting.UserRequest.perform(UserRequest.java:153)09:53:40 at hudson.remoting.UserRequest.perform(UserRequest.java:50)09:53:40 at hudson.remoting.Request$2.run(Request.java:336)09:53:40 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)09:53:40 at java.util.concurrent.FutureTask.run(FutureTask.java:266)09:53:40 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)09:53:40 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)09:53:40 at java.lang.Thread.run(Thread.java:748)09:53:40 Caused: java.io.IOException: Cannot run program "docker": error=2, No such file or directory*09:53:40* at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)09:53:40 at hudson.Proc$LocalProc.<init>(Proc.java:245)09:53:40 at hudson.Proc$LocalProc.<init>(Proc.java:214)09:53:40 at hudson.Launcher$LocalLauncher.launch(Launcher.java:850)09:53:40 at hudson.Launcher$ProcStarter.start(Launcher.java:384)09:53:40 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1195)09:53:40 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1160)09:53:40 at hudson.remoting.UserRequest.perform(UserRequest.java:153)09:53:40 at hudson.remoting.UserRequest.perform(UserRequest.java:50)09:53:40 at hudson.remoting.Request$2.run(Request.java:336)09:53:40 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)09:53:40 at java.util.concurrent.FutureTask.run(FutureTask.java:266)09:53:40 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)09:53:40 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)09:53:40 at java.lang.Thread.run(Thread.java:748)09:53:40 at ......remote call to ubuntu(Native Method)09:53:40 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)09:53:40 at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)09:53:40 at hudson.remoting.Channel.call(Channel.java:830)09:53:40 at hudson.Launcher$RemoteLauncher.launch(Launcher.java:959)09:53:40 at hudson.Launcher$ProcStarter.start(Launcher.java:384)09:53:40 at hudson.Launcher$ProcStarter.join(Launcher.java:395)09:53:40 at com.cloudbees.jenkins.plugins.docker_build_env.Docker.hasImage(Docker.java:87)09:53:40 at com.cloudbees.jenkins.plugins.docker_build_env.PullDockerImageSelector.prepareDockerImage(PullDockerImageSelector.java:29)09:53:40 at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:169)09:53:40 at hudson.model.Build$BuildExecution.doRun(Build.java:157)09:53:40 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)09:53:40 at hudson.model.Run.execute(Run.java:1735)09:53:40 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)09:53:40 at hudson.model.ResourceController.execute(ResourceController.java:97)09:53:40 at hudson.model.Executor.run(Executor.java:405)
      ```
      ```
      it seems that the build failed after `git clone` before any of the build commands are running.

            Unassigned Unassigned
            zhaoyi0113 Yi Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: