title: rebuild docker image from specific step
body: <p>I have the below Dockerfile. </p>
  
  <pre class="lang-dockerfile prettyprint-override"><code>FROM ubuntu:14.04
  MAINTAINER Samuel Alexander &lt;samuel@alexander.com&gt;
  
  RUN apt-get -y install software-properties-common
  RUN apt-get -y update
  
  # Install Java.
  RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
  RUN add-apt-repository -y ppa:webupd8team/java
  RUN apt-get -y update
  RUN apt-get install -y oracle-java8-installer
  RUN rm -rf /var/lib/apt/lists/*
  RUN rm -rf /var/cache/oracle-jdk8-installer
  
  # Define working directory.
  WORKDIR /work
  
  # Define commonly used JAVA_HOME variable
  ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
  
  # JAVA PATH
  ENV PATH /usr/lib/jvm/java-8-oracle/bin:$PATH
  
  # Install maven
  RUN apt-get -y update
  RUN apt-get -y install maven
  
  # Install Open SSH and git
  RUN apt-get -y install openssh-server
  RUN apt-get -y install git
  
  # clone Spark
  RUN git clone https://github.com/apache/spark.git
  WORKDIR /work/spark
  RUN mvn -DskipTests clean package
  
  # clone and build zeppelin fork
  RUN git clone https://github.com/apache/incubator-zeppelin.git
  WORKDIR /work/incubator-zeppelin
  RUN mvn clean package -Pspark-1.6 -Phadoop-2.6 -DskipTests
  
  # Install Supervisord
  RUN apt-get -y install supervisor
  RUN mkdir -p var/log/supervisor
  
  # Configure Supervisord
  COPY conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  
  # bash
  RUN sed -i s#/home/git:/bin/false#/home/git:/bin/bash# /etc/passwd
  
  EXPOSE 8080 8082
  CMD ["/usr/bin/supervisord"]
  </code></pre>
  
  <p>While building image it failed in step 23 i.e. </p>
  
  <pre class="lang-dockerfile prettyprint-override"><code>RUN mvn clean package -Pspark-1.6 -Phadoop-2.6 -DskipTests
  </code></pre>
  
  <p>Now when I rebuild it starts to build from step 23 as docker is using cache.</p>
  
  <p>But if I want to rebuild the image from step 21 i.e. </p>
  
  <pre class="lang-dockerfile prettyprint-override"><code>RUN git clone https://github.com/apache/incubator-zeppelin.git
  </code></pre>
  
  <p>How can I do that? 
  Is deleting the cached image is the only option? 
  Is there any additional parameter to do that?</p>