Faster CI Without Losing Signal
How a Docker-heavy pipeline dropped from roughly ten minutes to four to six without removing required checks.

Fast CI is only useful when the team still trusts the result.
On one client project, a common pull request pipeline took roughly nine to ten minutes. Most of that time was not spent running tests. It was spent building Docker stages the job did not need.
The goal was to shorten the feedback loop without moving checks elsewhere, weakening validation, or surprising people who still used the default local build path.
Remove work from the critical path
The Dockerfile produced several related images: runtime, test, and specialized workload variants. The pipeline treated them as one path even when pull request validation only needed the test image and runtime dependencies.
We made each target explicit. Runtime builds stopped at the runtime stage. Test and specialized stages were built only when requested. Build-only validation could reuse Docker cache, while deployment publishing kept its stricter cleanup behavior.
The wrappers around those builds were updated together. An optimization hidden in one CI command is fragile. The next script or branch can quietly fall back to the old behavior.
Keep automation deterministic
Docker metadata collection was another source of risk. A local tool can ask a human for context or credentials. In CI, the same behavior can waste time or leave a job waiting forever.
The build path now declares that it is non-interactive:
BUILDX_GIT_INFO=false
BUILDX_METADATA_PROVENANCE=false
That was less about speed than reliability. Automated environments should never depend on an unanswered prompt.
The result
Post-change samples landed between 3m43s and 5m49s, down from roughly nine to ten minutes. That cut feedback time by about 40% to 55% while preserving the required checks and the normal docker build . behavior.
The safest CI optimization is often not deleting validation. It is removing accidental work:
- build only the stages the job needs
- make targets explicit at every call site
- use cache behavior appropriate to the job
- keep non-interactive builds truly non-interactive
- validate both pull request and post-merge paths
Faster feedback and trustworthy feedback are not competing goals. A good delivery system improves both.