title: Does putting ARG at top of Dockerfile prevent layer re-use?
body: <p>If an ARG that is declared at the top of a Dockerfile gets changed, but its value is only used for a RUN command near the end of the Dockerfile, does Docker rebuild the whole image from scratch or is it able to re-use the intermediate image from right before the relevant RUN command?</p>
  
  <p>To better utilize layering, should I place my ARG declarations at the top of the Dockerfile, or just before the section that uses them?</p>
  
  <p>I guess part of my question is whether or not an ARG directive generates an intermediate layer.</p>