# muscles

> Explains container images layer by layer, finds the bytes an image stores but never shows, diffs two images and fails CI when an image breaks its budgets.

- URL: https://rossedman.io/projects/muscles/

`muscles` shows what every layer of a container image added, modified, rewrote with the same contents and deleted, next to the Dockerfile step that did it. It reads from the Docker daemon, a registry (without pulling), a `docker save` tarball or an OCI layout.

```shell
muscles python:3.12-slim    # what to fix first, and what it saves
```

- **Every layer, explained**, with notes for package caches left behind, deletions that free nothing and `chown -R` rewrites.
- **Waste, attributed.** Every hidden byte with the layer that stored it and the layer that hid it.
- **Release diffs.** Which layers two images share and every path that changed.
- **CI budgets** for size, waste, growth against main and forbidden paths, from a committed `.muscles.yaml`.
- **Fast.** Layer indexes are cached by digest, so a base image is only read once.
