The Build Is Slow, So Let's Just Add --no-cache to CI?
CI Docker builds crept to 11 minutes and once shipped a stale dependency. A teammate wants --no-cache on every build. Defend what you actually do first.
the decision you defend
Docker builds in CI are taking 11 minutes and sometimes ship stale dependencies. A teammate says just add --no-cache to every build so we always get a clean image and stop debugging cache weirdness. What do you do, and why?
the situation
Your CI pipeline builds a Docker image on every push. Over the last few months the build time crept from about 3 minutes to 11, and last week a deploy shipped an image that still had an old version of a library everyone thought had been upgraded. After that nobody trusts the cache anymore.
context
The service is a Node app built from a simple Dockerfile. Line 4 is COPY . . and the RUN npm ci step comes after it, so every push copies the whole working tree in before dependencies are installed. The base image is referenced by a floating tag rather than a digest. A teammate posts in the channel: just add --no-cache to every CI build, then we always get a clean image and we can stop debugging cache weirdness.
How this challenge works
Take a position on the decision above and defend it. A senior-engineer AI will push back over up to 4 rounds. When you are done, you are scored against a verified rubric so you can see exactly what a complete answer covers - these are learning prompts, not gotchas.