🗒️Dockerfile Best Practices Checklist

Tick items, enter positions, count rebuilt layers

Check only what already applies. No score and no grade are produced: the tool counts applied and open items and the layers your cache rebuilds.

cmds
pos
pos

You Might Also Need

Counts and layers instead of a score

Scoring a Dockerfile means inventing a weight for every item, and no authority publishes those weights. So this tool produces no score and no grade. It counts how many items apply, lists the ones that do not yet apply, and explains why each matters. The items come from behaviour the Docker documentation describes.

The number it does calculate is about the layer cache. Enter how many instructions create a layer and where the source COPY sits, and it counts the layers reused from cache and the layers rebuilt when only source files change. If dependency install sits below the source COPY, it also shows how many rebuilt layers moving it up would remove, as of October 2026.

The layer counts come from instruction positions alone. Build time, cache mounts, remote cache hits and which multi-stage stages actually run are not modelled, so measurements will differ. The checklist tally reflects what you ticked, not an analysis of your Dockerfile.

Frequently Asked Questions

Why is there no score?

Because no authority defines a weight for each item. Invented weights produce a convincing number with nothing behind it, so the tool reports only countable values: how many items apply and how many layers rebuild.

Why put dependency install above the source COPY?

The layer cache invalidates everything after a changed step. With install below the source copy, editing one source line reinstalls dependencies, while install above keeps that layer cached as long as the dependency files are unchanged.

Can I paste a Dockerfile for automatic review?

No, the tool does not read files. It takes the instruction count and positions as numbers and leaves the checklist to you. Automatic review would have to parse syntax and base images, and a shallow parser reaches wrong conclusions.