How We Made Docker Builds 193x Faster: From 45 Minutes to 14 Seconds
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Helix reduced Docker build times from 45 minutes to 14 seconds (193x faster) for AI coding agents running in isolated desktop containers. The solution involved three layered optimizations: (1) a transparent Docker wrapper that intercepts build commands and skips image loading when the image digest hasn't changed; (2) a shared BuildKit instance with persistent cache across agent sessions, combined with a local Docker registry for layer-level deduplication instead of full tarball transfers; and (3) a 'golden cache' system that snapshots the entire /var/lib/docker directory after a successful build on main, then copies it (via cp -a) into new sessions so they start pre-populated. The wrapper also intercepts docker compose build, which bypasses the CLI and would otherwise miss the optimizations. Warm starts went from 45 minutes to 23 seconds, cold starts from 45 minutes to 14 seconds, and incremental single-layer rebuilds to ~1 second per image.
Table of contents
The ProblemThe ArchitectureThe --load BottleneckSmart --loadRegistry-Accelerated LoadingResultsCompose Build InterceptionThe Golden Docker Cache: Eliminating Cold Start EntirelyThe Full PictureImplementationWhat We Built1 Comment
Sort: