title: How to execute single step or post-build action on a docker host if Jenkins pipeline is dockerized?
body: <p>Suppose I have a dockerized pipeline with multiple steps. The docker container is defined in the beginning of <code>Jenkinsfile</code>:</p>
  <pre><code>pipeline {
    agent {
      docker {
        image 'gradle:latest'
      }
    }
  
    stages {
      // multiple steps, all executed in 'gradle' container 
    }
  
  post {
      always {
        sh 'git whatever-command' // will not work in 'gradle' container
      }
    }
  }
  </code></pre>
  <p>I would like to execute some <code>git</code> commands in a post-build action. The problem is that <code>gradle</code> image does not have <code>git</code> executable.</p>
  <blockquote>
  <p>script.sh: line 1: git: command not found</p>
  </blockquote>
  <p>How can I execute it on Docker host still using <code>gradle</code> container for all other build steps? Of course I do not want to explicitly specify container for each step but that specific post-post action.</p>