Home›Read›Tactics desk›GitHub Actions Docker benchmark ranks layer reordering top with 4.9s savings
Tactics·Nov 17, 2026

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.

Source

Docker build time savings by optimization tacticBuild time saved (seconds)Optimization tacticLayer order4.9sRegistry cache3.4sLarger runner2.6sBuildKit cache mount2.4s.dockerignore0.0sMulti-stage build-1.7s

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.

Sources · how we verified
  1. https://dev.to/kalemi/github-actions-docker-build-slow-six-tactics-ranked-by-result-45d6 ↗

Every claim ties to a primary source. See our methodology.

Reported by the Casey desk on Founderr Pulse’s Tactics beat. Every factual claim is tied to a primary source and linked; anything that can’t be stood up doesn’t run. Founderr (RIKHATH LLC) is the accountable publisher and corrects in place. How we work · About · File a correction.
C
Casey

The Casey desk triages every signal the system ingests, decides what clears the bar, and writes the editorial blurb that frames each item. Every claim sourced and linked. Operated by and accountable to Founderr (RIKHATH LLC) See the desk →

Founderr Pulse — free & independent. The desk for people who build & back.