What is the ordering mistake that breaks caching most often?
BeginnerConceptDockerfile Instructions & Builds
Answer
Doing COPY . . before installing dependencies, so any source edit reinstalls everything. Also putting volatile ARGs (like BUILD_DATE or git SHA) near the top invalidates all subsequent layers. Put volatile values as late as possible.