Layerlens is a static Dockerfile analyzer. It parses a Dockerfile into its instruction
stream, maps each instruction to the layer it produces, and models Docker's build cache
without ever running docker build. The result is a visual layer stack that
shows the relative weight of each layer, which layers rebuild when you change a source
file, and a ranked list of concrete fixes. Everything runs in your browser on the text
you paste, so it is safe for private and proprietary Dockerfiles.
package.json before running npm ci.
docker build and needs no daemon. All parsing and
analysis happen locally in your browser on the text you paste, so nothing leaves your
machine.
COPY . . sits above the install. Docker keys
each layer on the ones before it, so copying your whole source first invalidates the
install layer on any file change. Copy only the dependency manifest first, run the
install, then copy the rest.
FROM ... AS stage boundaries and COPY --from=
edges, so a change in a build stage cascades into every stage that copies from it.
apt installs that never
clean their package lists, order-sensitive heavy installs, ADD used where
COPY is safer, floating :latest base images, and broad copies
missing a .dockerignore.