title: Docker build is not using cache
body: <p><code>docker build</code> is not using it's cache. </p>
  
  <pre><code>docker build -f Dockerfile .
  </code></pre>
  
  <p>generates the same output that this does:</p>
  
  <pre><code>docker build -f Dockerfile --no-cache .
  </code></pre>
  
  <p>I am modifying the Dockerfile, adding commands at the end of the file. So the previous layers should be cached and valid.</p>
  
  <p>I've got plenty of disk space. </p>
  
  <p>Any ideas?</p>
  
  <p>Docker version 17.06.1-ce, build 874a737</p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM registry:5000/base/python:xenial
  
  RUN mkdir /code
  COPY . /code
  
  RUN apt-get update &amp;&amp; \
      apt-get install -y \
      vim \
      less
  
  COPY /etc/foo /etc/foo
  
  ENTRYPOINT ["/bin/bash"]
  </code></pre>