title: Jenkins docker pipeline error
body: <p>I'm trying to follow this <a href="http://www.coding-stories.com/blog/2015/08/23/continuous-delivery-with-jenkins-workflow-and-docker/" rel="noreferrer">tutorial</a> to create a simple docker environment in as part of my jenkins pipeline build.</p>
  
  <p>I'm trying to build a couple of docker images just as a test before I do my maven build.  At the moment I have the following groovy for my Jenkinsfile:</p>
  
  <pre><code>#!groovy
  
  node {
  
    stage 'Building docker env'
    def dbImage = docker.build('oracle', 'docker/oracle')
    def wlpImage = docker.build('liberty', 'docker/liberty')
  
  
    stage 'Running maven build'
    git url: 'https://mysite/myproject.git', branch: 'docker'
    def mvnHome = tool 'maven 3.3.9'
    sh "${mvnHome}/bin/mvn -B clean install"
  }
  </code></pre>
  
  <p>I'm trying to have the docker build look in the directory "docker/oracle" and call the Dockerfile in that directory, and build the docker image named 'oracle', and same for liberty.  At the moment though it's giving me this error:</p>
  
  <pre><code>Running on master in /root/.jenkins/workspace/pipeline_test
  [Pipeline] {
  [Pipeline] stage (Building docker env)
  Using the ‘stage’ step without a block argument is deprecated
  Entering stage Building docker env
  Proceeding
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  groovy.lang.MissingPropertyException: No such property: docker for class: groovy.lang.Binding
      at groovy.lang.Binding.getVariable(Binding.java:63)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:224)
      at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28)
      at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
  ...
  </code></pre>
  
  <p>Any ideas what could be the problem with the docker.build command I'm using? (or could it be something I forgot to install in Jenkins?)</p>