title: How to conditionally pull the latest tag of a Docker image, instead of using the cached version?
body: <p>My Dockerfile contains this line:</p>
  
  <pre><code>COPY --from=whatwg/wattsi:latest /whatwg/wattsi/bin/wattsi /bin/wattsi
  </code></pre>
  
  <p>i.e., it is copying an executable from the <code>whatwg/wattsi</code> image available on Docker Hub. This is essentially straight out of the documentation on <a href="https://docs.docker.com/develop/develop-images/multistage-build/" rel="nofollow noreferrer">multi-stage builds</a>.</p>
  
  <p>However, once I run the Dockerfile, it caches a local copy of <code>whatwg/wattsi:latest</code>. Then, any subsequent updates of <code>whatwg/wattsi</code> that get pushed to Docker Hub are ignored, and the cached copy is used. (I.e., this entire line just gets skipped, and the layer that it creates is reused.)</p>
  
  <p>The behavior I would like is to have Docker compare the remote <code>whatwg/wattsi:latest</code> to the local cached copy, and re-download if there are differences. Is that possible?</p>
  
  <p>I would like to do this without hard-coding a version for <code>whatwg/wattsi</code> into my Dockerfile, that needs to be updated every time <code>whatwg/wattsi</code> revs.</p>