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

Docker pipeline: 'absolute path' error when running linux container under windows host

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • docker-workflow-plugin
    • None
    • Jenkins 2.164.1
      Docker Pipeline 1.21
      Pipeline 2.6
      Windows 10

      I have a jenkins master on linux, a slave agent on windows 10. On the slave there is docker desktop installed. I can run commands under this docker from windows command line, for example:

      docker run --rm -v c:/Users/modtest:/home/pkruk node:alpine sh -c "ls -la"
      total 64
      drwxr-xr-x 1 root root 4096 Dec 12 17:09 .
      drwxr-xr-x 1 root root 4096 Dec 12 17:09 ..
      -rwxr-xr-x 1 root root 0 Dec 12 17:09 .dockerenv
      [...] 

      But when I try to execute following pipeline:

      pipeline {
          agent {
              docker { image 'node:alpine' }
          }
          stages {
              stage('Build') {
                  environment {
                      HOME = '.'
                  }
                  steps {
                      sh 'rm -f *.vsix'
                  }
                  post {
                      always {
                          archiveArtifacts artifacts: '*.vsix', fingerprint: true
                      }
                  }
              }
          }
      } 

      I get following error:

      Started by user pkruk
      Obtained Jenkinsfile from git [...]
      Running in Durability level: PERFORMANCE_OPTIMIZED
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on piwon in C:\Jenkins\workspace\priv.pkruk
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Declarative: Checkout SCM)
      [Pipeline] checkout
      [...]
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] withEnv
      [Pipeline] {
       > git rev-list --no-walk c05145e1abded6851debb54aa8e76bb1151e3fad # timeout=10
      [Pipeline] isUnix
      [Pipeline] batC:\Jenkins\workspace\priv.pkruk>docker inspect -f . node:alpine 
      .
      [Pipeline] withDockerContainer
      piwon does not seem to be running inside a container
      [Pipeline] // withDockerContainer
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.io.IOException: Failed to run image 'node:alpine'. Error: docker: Error response from daemon: the working directory 'C:/Jenkins/workspace/priv.pkruk/' is invalid, it needs to be an absolute path.
      See 'docker run --help'.
      	at org.jenkinsci.plugins.docker.workflow.client.WindowsDockerClient.run(WindowsDockerClient.java:57)
      	at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:199)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
      	at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(Docker.groovy:126)
      	at org.jenkinsci.plugins.docker.workflow.Docker.node(Docker.groovy:66)
      	at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(Docker.groovy:114)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.agent.impl.DockerPipelineScript.runImage(DockerPipelineScript.groovy:54)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.agent.impl.AbstractDockerPipelineScript.configureRegistry(AbstractDockerPipelineScript.groovy:73)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.agent.impl.AbstractDockerPipelineScript.run(AbstractDockerPipelineScript.groovy:52)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.agent.CheckoutScript.checkoutAndRun(CheckoutScript.groovy:61)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
      	at sun.reflect.GeneratedMethodAccessor325.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
      	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:405)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:317)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:281)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE 

      I found a couple of SO posts with the same error but they offer no real solution:

      https://stackoverflow.com/questions/58447566/jenkins-pipeline-docker-agent-docker-run-error-failed-to-run-image-java-io

      https://stackoverflow.com/questions/56136415/jenkins-windows-docker-fails-to-run-image-working-directory-is-invalid-it-need

       

          [JENKINS-60473] Docker pipeline: 'absolute path' error when running linux container under windows host

          Robert Hecker added a comment -

          Hi mrsonicblue,

          When i try to run the command manualy on my windows machine, where i manualy started the container like above, i get following error code:

          D:\>docker exec --env BUILD_DISPLAY_NAME=#4 --env BUILD_ID=4 --env BUILD_NUMBER=4 --env BUILD_TAG=jenkins-Parenthesis Test (wee)-4 --env BUILD_URL=http://example.com/job/Parenthesis%20Test%20(wee)/4/ --env CLASSPATH= --env EXECUTOR_NUMBER=2 --env HUDSON_HOME=/var/lib/jenkins --env HUDSON_SERVER_COOKIE=a78bfd62731ccf0a --env HUDSON_URL=http://example.com/ --env JENKINS_NODE_COOKIE=06d630b9-7764-43ee-85e0-eb9a26bcc2d2 --env JENKINS_SERVER_COOKIE=please-do-not-kill-me --env JENKINS_URL=http://example.com/ --env JOB_BASE_NAME=Parenthesis Test (wee) --env JOB_DISPLAY_URL=http://example.com/job/Parenthesis%20Test%20(wee)/display/redirect --env JOB_NAME=Parenthesis Test (wee) --env JOB_URL=http://example.com/job/Parenthesis%20Test%20(wee)/ --env NODE_LABELS=localhost master --env NODE_NAME=master --env RUN_CHANGES_DISPLAY_URL=http://example.com/job/Parenthesis%20Test%20(wee)/4/display/redirect?page=changes --env RUN_DISPLAY_URL=http://example.com/job/Parenthesis%20Test%20(wee)/4/display/redirect --env STAGE_NAME=Test --env WORKSPACE=/var/lib/jenkins/workspace/Parenthesis Test (wee) --env library.migration-library.version=master 63c3793d8f3730cafcc37fb3e495d25ec8e520d12cf9a599342697fc64616393 nohup sh -c ({ while [ -d '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9' -a \! -f '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt' ]; do touch '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-log.txt'; sleep 3; done } & jsc=durable-27a2324005ef9d26531c4508bfcb22d4; JENKINS_SERVER_COOKIE=$jsc 'sh' -xe '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/script.sh' > '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-log.txt' 2>&1; echo $? > '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt.tmp'; mv '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt.tmp' '/var/lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt'; wait) >&- 2>&- &
          ">&" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
          

          To get the expected output i tried it with this "docker exec" command:

          D:\>docker exec -it e735b5e12baebfe12af2e56bea9fd031f088503d835a343b21ecb876b5caf18b node --version
          v7.10.1
          

          This delivered me the expected version information as output. Hope this information help you for your investigation.  !

          Robert Hecker added a comment - Hi mrsonicblue , When i try to run the command manualy on my windows machine, where i manualy started the container like above, i get following error code: D:\>docker exec --env BUILD_DISPLAY_NAME=#4 --env BUILD_ID=4 --env BUILD_NUMBER=4 --env BUILD_TAG=jenkins-Parenthesis Test (wee)-4 --env BUILD_URL=http: //example.com/job/Parenthesis%20Test%20(wee)/4/ --env CLASSPATH= --env EXECUTOR_NUMBER=2 --env HUDSON_HOME=/ var /lib/jenkins --env HUDSON_SERVER_COOKIE=a78bfd62731ccf0a --env HUDSON_URL=http://example.com/ --env JENKINS_NODE_COOKIE=06d630b9-7764-43ee-85e0-eb9a26bcc2d2 --env JENKINS_SERVER_COOKIE=please- do -not-kill-me --env JENKINS_URL=http://example.com/ --env JOB_BASE_NAME=Parenthesis Test (wee) --env JOB_DISPLAY_URL=http://example.com/job/Parenthesis%20Test%20(wee)/display/redirect --env JOB_NAME=Parenthesis Test (wee) --env JOB_URL=http://example.com/job/Parenthesis%20Test%20(wee)/ --env NODE_LABELS=localhost master --env NODE_NAME=master --env RUN_CHANGES_DISPLAY_URL=http://example.com/job/Parenthesis%20Test%20(wee)/4/display/redirect?page=changes --env RUN_DISPLAY_URL=http://example.com/job/Parenthesis%20Test%20(wee)/4/display/redirect --env STAGE_NAME=Test --env WORKSPACE=/ var /lib/jenkins/workspace/Parenthesis Test (wee) --env library.migration-library.version=master 63c3793d8f3730cafcc37fb3e495d25ec8e520d12cf9a599342697fc64616393 nohup sh -c ({ while [ -d '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9' -a \! -f '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt' ]; do touch '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-log.txt' ; sleep 3; done } & jsc=durable-27a2324005ef9d26531c4508bfcb22d4; JENKINS_SERVER_COOKIE=$jsc 'sh' -xe '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/script.sh' > '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-log.txt' 2>&1; echo $? > '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt.tmp' ; mv '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt.tmp' '/ var /lib/jenkins/workspace/Parenthesis Test (wee)@tmp/durable-11d2bcc9/jenkins-result.txt' ; wait) >&- 2>&- & ">&" kann syntaktisch an dieser Stelle nicht verarbeitet werden. To get the expected output i tried it with this " docker exec " command: D:\>docker exec -it e735b5e12baebfe12af2e56bea9fd031f088503d835a343b21ecb876b5caf18b node --version v7.10.1 This delivered me the expected version information as output. Hope this information help you for your investigation.   !

          Robert Hecker added a comment -

          Hello Together,

          in the meantime i found more details why it is not working on a Jenkins Master which is installed on Windows. I got now extended messages on the execution log, which points more clearer to the Problem. The interesting part of the log is:

          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -d -t -w /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test/ -v D:/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test/:/d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test/ -v D:/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/:/d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/ -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:7-alpine cat
          $ docker top 0c8e23cea55f3e827eb013a74fed9b28e0585a5a243bef9ec897441dfc320a60
          [Pipeline] {
          [Pipeline] stage
          [Pipeline] { (Test)
          [Pipeline] sh
          sh: can't create /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/durable-f0f56139/jenkins-log.txt: nonexistent directory
          sh: can't create /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/durable-f0f56139/jenkins-result.txt.tmp: nonexistent directory
          mv: can't rename '/d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/durable-f0f56139/jenkins-result.txt.tmp': No such file or directory
          process apparently never started in D:\Sandbox_GIT\Jenkins_Plugin\docker-workflow-plugin-master\work\workspace\test@tmp\durable-f0f56139
          [Pipeline] }
          

          For me it seems that some folders are not existing, and due this he can not create the file. 

          Following 2 Folders exist on my Windows Master:

          • D:\Sandbox_GIT\Jenkins_Plugin\docker-workflow-plugin-master\work\workspace\test
          • D:\Sandbox_GIT\Jenkins_Plugin\docker-workflow-plugin-master\work\workspace\test@tmp

          What needs to be changed in the Plugin, to get this working?

          Robert Hecker added a comment - Hello Together, in the meantime i found more details why it is not working on a Jenkins Master which is installed on Windows. I got now extended messages on the execution log, which points more clearer to the Problem. The interesting part of the log is: [Pipeline] withDockerContainer Jenkins does not seem to be running inside a container $ docker run -d -t -w /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test/ -v D:/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test/:/d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test/ -v D:/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/:/d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/ -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:7-alpine cat $ docker top 0c8e23cea55f3e827eb013a74fed9b28e0585a5a243bef9ec897441dfc320a60 [Pipeline] { [Pipeline] stage [Pipeline] { (Test) [Pipeline] sh sh: can't create /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/durable-f0f56139/jenkins-log.txt: nonexistent directory sh: can't create /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/durable-f0f56139/jenkins-result.txt.tmp: nonexistent directory mv: can 't rename ' /d/Sandbox_GIT/Jenkins_Plugin/docker-workflow-plugin-master/work/workspace/test@tmp/durable-f0f56139/jenkins-result.txt.tmp': No such file or directory process apparently never started in D:\Sandbox_GIT\Jenkins_Plugin\docker-workflow-plugin-master\work\workspace\test@tmp\durable-f0f56139 [Pipeline] } For me it seems that some folders are not existing, and due this he can not create the file.  Following 2 Folders exist on my Windows Master: D:\Sandbox_GIT\Jenkins_Plugin\docker-workflow-plugin-master\work\workspace\test D:\Sandbox_GIT\Jenkins_Plugin\docker-workflow-plugin-master\work\workspace\test@tmp What needs to be changed in the Plugin, to get this working?

          Robert Hecker added a comment -

          i saw that the subdirectories on the Windows host where created ("\durable-f0f56139") and a .sh script is inside there with the command from the pipeline *"node --version" is inside.

          So the next question would be where, and with which parameters does the plugin call the docker exec command? 

          Can this found in a jenkins log ? When yes, how to configure the log to get this information ?

          Any help would be great! Thanks a lot in advance!

          Robert Hecker added a comment - i saw that the subdirectories on the Windows host where created ( "\durable-f0f56139" ) and a .sh script is inside there with the command from the pipeline *"node --version" is inside. So the next question would be where, and with which parameters does the plugin call the docker exec command?  Can this found in a jenkins log ? When yes, how to configure the log to get this information ? Any help would be great! Thanks a lot in advance!

          James Pan added a comment -

          Hi All,

          I am facing the same issue now and wondering if the problem has been solved? When I use Docker Desktop on windows, I usually use the following argument to map a path on my window host to a linux docker

          -v /d/jenkins_data:/var/jenkins_home

          I am wondering if this is the issue course the error because I have searched on the internet and lots of post described docker doesn't support path format in windows format.

          James Pan added a comment - Hi All, I am facing the same issue now and wondering if the problem has been solved? When I use Docker Desktop on windows, I usually use the following argument to map a path on my window host to a linux docker -v /d/jenkins_data:/ var /jenkins_home I am wondering if this is the issue course the error because I have searched on the internet and lots of post described docker doesn't support path format in windows format.

          James Pan added a comment -

          I thing I have found the root course. When I use a docker image with the same type of the host, it's fine, however, when I use a docker image which is different from the host, this plugin will have exceptions. For example, if the host is a windows and wanted to use a linux image as the slave, then working directory will not work because D:\ or C:\ is not a absolution path in the linux system, that must be changed to /d or /c.

          However, since the host is a windows, the WindowsDockerClient will be used and cmd.exe will be run in the linux image, and that will lead to another exception. The conclusion is to use an image which align with the host.

          I haven't tested on a Mac but I think Mac<>Linux will be fine but Mac<>Windows will still have the same issue.

          James Pan added a comment - I thing I have found the root course. When I use a docker image with the same type of the host, it's fine, however, when I use a docker image which is different from the host, this plugin will have exceptions. For example, if the host is a windows and wanted to use a linux image as the slave, then working directory will not work because D:\ or C:\ is not a absolution path in the linux system, that must be changed to /d or /c. However, since the host is a windows, the WindowsDockerClient will be used and cmd.exe will be run in the linux image, and that will lead to another exception. The conclusion is to use an image which align with the host. I haven't tested on a Mac but I think Mac< >Linux will be fine but Mac< >Windows will still have the same issue.

          Alex added a comment -

          Thanks for all the hard work here but I am still at a loss to understand how to resolve the issue with Jenkins or Docker not figuring out which path to use.  I have the exact error as started in this post.  I am running Jenkins on WIndows and the goal is to run a linux container on a windows host (running a linux vm).   What I noticed when modifying the config.xml to a path like /c/users/mydir/ the output produced is $ docker run -d -t -w C:/c/users/mydir.  All I was trying to do is figure out what configuration I can change to convert it to a path that linux likes and I cannot figure out how to tell Jenkins to create the right path.  I know what I did is not the solution (again trying to repro the problem).

          Is there a single configuration item somewhere that tells jenkins to do this

          $ docker run -d -t -w /c/users/

          instead of this?

          $ docker run -d -t -w C:/users/

           

          Alex added a comment - Thanks for all the hard work here but I am still at a loss to understand how to resolve the issue with Jenkins or Docker not figuring out which path to use.  I have the exact error as started in this post.  I am running Jenkins on WIndows and the goal is to run a linux container on a windows host (running a linux vm).   What I noticed when modifying the config.xml to a path like /c/users/mydir/ the output produced is $ docker run -d -t -w C: /c/users/mydir.  All I was trying to do is figure out what configuration I can change to convert it to a path that linux likes and I cannot figure out how to tell Jenkins to create the right path.  I know what I did is not the solution (again trying to repro the problem). Is there a single configuration item somewhere that tells jenkins to do this $ docker run -d -t -w /c/users/ instead of this? $ docker run -d -t -w C:/users/  

          shim added a comment -

          The updates Eric Schneider made in https://github.com/mrsonicblue/docker-workflow-plugin fixes the issue.  If using an older version of Docker you'll get a "The container started but didn't run the expected command" or "process apparently never started" due to how BusyBox returns output from the "top" command.  BusyBox 'ps' command prints the cat command as "{cat}", so it looks like it never spawned.    I created a PR (https://github.com/mrsonicblue/docker-workflow-plugin/pull/1) that changes the code to also look for {cat} and [cat].   This should make it work in the general case

           

           

          shim added a comment - The updates Eric Schneider made in  https://github.com/mrsonicblue/docker-workflow-plugin  fixes the issue.  If using an older version of Docker you'll get a "The container started but didn't run the expected command" or "process apparently never started" due to how BusyBox returns output from the "top" command.  BusyBox 'ps' command prints the cat command as "{cat}", so it looks like it never spawned.    I created a PR ( https://github.com/mrsonicblue/docker-workflow-plugin/pull/1)  that changes the code to also look for {cat} and [cat] .   This should make it work in the general case    

          Mate Rigo added a comment -

          Thanks shim for your response.

          The only thing I do not understand: why weren't any of the pull requests approved?

          https://github.com/jenkinsci/docker-workflow-plugin/pull/197

          https://github.com/jenkinsci/docker-workflow-plugin/pull/234

          https://github.com/jenkinsci/docker-workflow-plugin/pull/235

          I mean this is a serious issue, for which there seems to be a solution.

           

          This was my intention to have a single slave machine which is running win10 and every build job would be performed in a docker container regardless if it was a windows native or linux native build.

          In the end this is the ultimate promise of containerization to once create the containers and execute them regardless of the host.

          Cheers!

          Mate Rigo added a comment - Thanks shim for your response. The only thing I do not understand: why weren't any of the pull requests approved? https://github.com/jenkinsci/docker-workflow-plugin/pull/197 https://github.com/jenkinsci/docker-workflow-plugin/pull/234 https://github.com/jenkinsci/docker-workflow-plugin/pull/235 I mean this is a serious issue, for which there seems to be a solution.   This was my intention to have a single slave machine which is running win10 and every build job would be performed in a docker container regardless if it was a windows native or linux native build. In the end this is the ultimate promise of containerization to once create the containers and execute them regardless of the host. Cheers!

          Hi, this issue is a serios blocker for us. When should we expect it to be published?

          Thank you!

          Bulent Karaahmed added a comment - Hi, this issue is a serios blocker for us. When should we expect it to be published? Thank you!

          Lachlan added a comment -

          I have found the solution to this issue, and will be putting in a pull request shortly.

          Lachlan added a comment - I have found the solution to this issue, and will be putting in a pull request shortly.

            Unassigned Unassigned
            pkruk Piotr Krukowiecki
            Votes:
            15 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: