title: How to invoke yarn command in docker's jenkins?
body: <p>When I install yarn using this command in CentOS terminal:</p>
  
  <pre><code>sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
  # Install yarn    
  yum install -y yarn
  </code></pre>
  
  <p>The yarn command run perfectly in terminal. But when the run the yarn install command in Docker's Jenkins(after docker's jenkins chekcout the project source code,compile react project),this is my build script:</p>
  
  <pre><code>yarn install 
  yarn build
  </code></pre>
  
  <p>it throw this error:</p>
  
  <pre><code>/bin/sh -xe /tmp/jenkins3735067167187767767.sh
  + yarn install
  /tmp/jenkins3735067167187767767.sh: 2: /tmp/jenkins3735067167187767767.sh: yarn: not found
  Build step 'Execute shell' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>When I don't using docker,I know it runs as user jenkins,but now I could not switch to user jenkins because it does not have a jenkins user.How to fix it?</p>
  
  <p>Docker version 1.13.1, build 07f3374/1.13.1
  Node version:v10.15.3
  yarn version:v1.15.2</p>