title: Docker not running in Jenkins Pipeline
body: <p>I am running a jenkins docker image by doing this:</p>
  
  <pre><code>docker run \
    --rm \
    -u root \
    -p 8080:8080 \
    -v /home/ec2-user/jenkins-data:/var/jenkins_home \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v "$HOME":/home \
    jenkins/jenkins:lts
  </code></pre>
  
  <p>I have my jenkins server up but when I try to run a docker build image as below:</p>
  
  <pre><code>pipeline {
      environment{
          registry = "leexha/node_demo"
          registyCredential = 'dockerhub'
          dockerImage = ''
      }
  
      agent any
      tools{
          nodejs "node"
  
      }
      stages {
  
          stage('Git clone'){
              steps{
                  git 'https://github.com/leeadh/node-jenkins-app-example.git'
              }
  
          }
          stage('Installing Node') { 
              steps {
                  sh 'npm install' 
              }
          }
  
          stage ('Conducting Unit test'){
              steps{
                  sh 'npm test'
              }
  
          }
  
          stage ('Building image'){
              steps{
                  script{
                      dockerImage = docker.build registry + ":$BUILD_NUMBER"
                  }
              }
  
          }
  
  
          stage ('Pushing to Docker Hub'){
              steps{
                  script{
                      docker.withRegistry('',registyCredential){
                          dockerImage.push()
                      }
                  }
              }
  
          }
  
      }
  }
  </code></pre>
  
  <p>it keeps telling me that dcoker is not found. </p>
  
  <p>I already enabled the docker process to communicate via the  -v /var/run/docker.sock:/var/run/docker.sock \</p>
  
  <p>So im pretty confused now whats going on. </p>
  
  <p>ANy help?</p>