By committing this to the root of the source repository, the  Jenkinsfile  can be changed to build a container based on this  Dockerfile  and then run the defined steps using that container: // Declarative // pipeline { agent { dockerfile true } stages { stage('Test') { steps { sh 'node --version' sh 'svn --version' } } } } // Script // The  agent { dockerfile true }  syntax supports a number of other options which are described in more detail in the Pipeline Syntax section. 53 FROM node:7-alpine RUN apk add -U subversion Dockerfile Using a Dockerfile with Jenkins Pipeline