Image builds fail in ways that do not mention disk. The fix is usually a cleanup. These ten habits keep a laptop out of that corner.
- Check free space before a big build.
flisk doctorreports it. One run on a laptop said "4.8 GiB free on this machine: building images needs at least 5 GiB". - Prune the build cache first.
docker builder prune -fis the gentle option. - Use
docker system prune -aflast. It removes unused images, containers and networks. Know what you will lose. - Look before you prune.
docker system dfshows where the space went. - Keep images small. Smaller base images, fewer layers, multi-stage builds.
- Use a
.dockerignore. Do not copynode_modules,targetor.gitinto the build context. - Order Dockerfile layers by change. Dependencies first, source last, so the cache survives.
- Remove stopped stacks.
flisk downremoves the containers it started. - Watch Rust and Node builds. They produce large intermediate output.
- Set a reminder. A monthly prune is cheaper than a failed build at a bad moment.
The rule
Disk is a resource like memory. Check it first, and the strange failures go away.

