Seems like unnecessary complexity to me. What about skipping the cache tricks until Docker releases a version that handles all thing cache related in a better way?
Depending on the amount of people you have waiting for Docker to do its job properly on each feedback loop, the time investment could pay for itself rather quickly.
If you are on a small team only running native Linux on their workstations, probably not the case.
I feel caching is one of those things that Docker hasn't spent enough time on. The Developer is left with a bunch of "techniques" to overcome its shortcomings.
Agreed. There's still no official way to copy context while excluding certain folders (ex: rarely changing static/public folders). This becomes far more difficult when dealing with multi-stage builds. I find it faster for my FE app to build on a separate stage and copy the build into an NGINX Dockerimage.