For years, i have been under the impression that every single instruction in the Docker file creates one image layer. This is reinforced by the official documentation at: https://docs.docker.com/build/cache/
However, in the official documentation itself, i see another page where it is specifically mentioned that the only DockerFile instructions to create image layers are: ADD,COPY and RUN. As per this page, rest of the DockerFile instructions just create some intermediate images and hence do not contribute to the overall size of the image. Here is the page which mentions this: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
I am confused now. What is the actual behavior with the latest version of Docker engine?
Any advice would be very much appreciated.
Thanks in advance.