Currently the docker build creates a new layer for each command in the docker file. It would be useful to optionally define sections of a Dockerfile to be run inside the same layer by adding LAYERSTART and LAYEREND commands. This could be used to remove unnecessary layers. For example:
This is exactly what I thought. Why all the trouble with the multi stage build and stuff… Just add a layer start and end.
This would really help but since this post is already quite old there seem to be nobody interested in such a feature