title: dockerfile cannot remove Device or resource busy
body: <p>I'm trying to do:</p>
  
  <pre><code>FROM mysql:5.7
  
  RUN rm -rf /var/lib/mysql
  
  COPY ./db /var/lib/mysql
  </code></pre>
  
  <p>And I get the error :</p>
  
  <blockquote>
    <p>rm: cannot remove '/var/lib/mysql': Device or resource busy</p>
  </blockquote>
  
  <p>I don't really need to <code>rm</code> the folder, I just want to overwrite, but for some reason the dockerfile doesn't overwrite, the <code>COPY</code> instruction just seems to fail silently.</p>
  
  <p>Not sure if there's caching going on or something but I use <code>--no-cache</code>, (this isn't the first time I built the image but files have changed).</p>
  
  <p>How I can debug?</p>