title: Node not found on Jenkins docker instance
body: <p>I am running Jenkins as a docker container, and have installed the <a href="https://wiki.jenkins.io/display/JENKINS/NodeJS+Plugin" rel="nofollow noreferrer">NodeJS plugin</a> and followed thoroughly the setup instructions. When I try to run a script using <code>node</code>, I get the following error:</p>
  
  <pre><code>/tmp/jenkins9123978873441132802.sh: line 1: node: not found
  Build step 'Execute shell' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>I checked the docker volume, the <code>node</code> bin is where it should be and is executable is there and it works fine when I run it from my host server:</p>
  
  <pre><code>user@server:/data/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/latest/bin$ ./node --version
  v9.2.0
  </code></pre>
  
  <p>I modified my build script to explore a bit further the problem:</p>
  
  <pre><code>echo $PATH
  
  cd /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/latest/bin
  ls -all
  ./node --version
  
  node --version
  npm --version
  </code></pre>
  
  <p>and look how strange this is:</p>
  
  <pre><code>Building in workspace /var/jenkins_home/workspace/release
  [WS-CLEANUP] Deleting project workspace...
  [WS-CLEANUP] Done
  Adding all registry entries
  copy managed file [Main config] to file:/var/jenkins_home/workspace/release@tmp/config69012336710357692tmp
  [release] $ /bin/sh -xe /tmp/jenkins6243047436861395796.sh
  + echo /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/latest/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
  /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/latest/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
  + cd /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/latest/bin
  + ls -all
  total 34112
  drwxr-xr-x 2 jenkins jenkins     4096 Nov 20 16:16 .
  drwxr-xr-x 6 jenkins jenkins     4096 Nov 20 16:16 ..
  -rwxrwxrwx 1 jenkins jenkins 34921762 Nov 14 20:33 node
  lrwxrwxrwx 1 jenkins jenkins       38 Nov 20 16:16 npm -&gt; ../lib/node_modules/npm/bin/npm-cli.js
  lrwxrwxrwx 1 jenkins jenkins       38 Nov 20 16:16 npx -&gt; ../lib/node_modules/npm/bin/npx-cli.js
  + ./node --version
  /tmp/jenkins6243047436861395796.sh: line 1: ./node: not found
  Build step 'Execute shell' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>The <code>node</code> executable is present, and it's executable (<code>+x</code>). The path is correctly set, but the build still fails.</p>