Skip to content

Docker

Docker layer cache

Quick answer

A Docker layer cache stores the filesystem layers produced by each Dockerfile instruction so unchanged instructions can be reused instead of re-executed.

A Docker layer cache stores the filesystem layers produced by each Dockerfile instruction so unchanged instructions can be reused instead of re-executed.

Why it matters

Layer caching is why instruction order matters so much: copy your lockfile and install dependencies before copying source, or every code change invalidates your install layer.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.