title: Force docker to rebuild a layer based on latest commit of a git repo
body: <p>Here is my Dockerfile</p>
  
  <pre><code>FROM ubuntu:18.04
  RUN apt-get update -y
  RUN apt-get upgrade -y
  RUN apt-get install mariadb-common mariadb-server mariadb-client nodejs npm -y
  RUN git clone https://github.com/yigalirani/sqlrabbit.js.git &amp;&amp; cd sqlrabbit.js &amp;&amp; npm install 
  </code></pre>
  
  <p>Note that the last line clones a git repo.</p>
  
  <p>My question is: when calling <code>docker build .</code> , is there a way to force docker to check the latest commit of the git repo and rebuild the layer if needed? </p>