GitHub Actions Docker benchmark ranks layer reordering top with 4.9s savings
Tactic · DEV Community · stat: 4.9s A DEV Community benchmark of GitHub Actions Docker builds tested six optimization tactics on a Node.js image to measure actual speed gains. Reordering Dockerfile…
Tactic · DEV Community · stat: 4.9s
A DEV Community benchmark of GitHub Actions Docker builds tested six optimization tactics on a Node.js image to measure actual speed gains. Reordering Dockerfile layers saved 4.9 seconds on rebuilds, outperforming registry caching and larger runners. Standard recommendations like .dockerignore produced no measurable time savings, while multi-stage builds added 1.7 seconds of cold overhead.
Layer ordering beats expensive runner upgrades for quick CI speedups Founders can cut CI build times immediately by auditing Dockerfile layer order before paying for larger runner instances.
DEV Community benchmark, 2026-09-20
Per DEV Community benchmark tests on a Node.js image running on Latchkey runners.
Reordering layers delivered double the time savings of upgrading runner hardware without incurring extra infrastructure expense.
Every claim ties to a primary source. See our methodology.