If the ARG declared at the top of the Dockerfile is changed, but its value is only used for the RUN command at the end of the Docker file, does Docker recompile the entire image from scratch or can it be reused, use the intermediate image on the right before the corresponding RUN command?
To make better use of layering, should you place ARG declarations at the top of the Docker file, or just before the section that uses them?
I assume that part of my question is whether the ARG directive generates an intermediate layer.
source
share