title: How do I specify docker run args when using a dockerfile agent in jenkins
body: <p>I am setting up a simple jenkins pipeline with a dockerfile agent, Jenkinsfile as follows:</p>
  
  <pre><code>pipeline {
  agent {
      dockerfile {
          dir 'docker'
      args '-v yarn_cache:usr/local/share/.cache/yarn'
      }
  }
  
  environment {
      CI = 'true'
  }
  
  stages {
  
      stage('Build') {
          steps {     
              sh 'yarn install'
              sh 'yarn run build'
          }
      }
  
      stage('Test') {
          steps {
              sh 'yarn run test'
          }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I would like the yarn cache persist in a volume so I want the image to be started with '-v yarn_cache:usr/local/share/.cache/yarn'. 
  With the given Jenkinsfile, jenkins stalls after creating the image. 
  The args parameter is not actually documentented for the dockerfile agent but for the docker agent.<br>
  Do I really have to use a predefined (and uploaded) image just to be able to use parameters ? 
  Cheers Thomas</p>