FahamLah

Commands

hadolint

hadolint [--failure-threshold <level>] <Dockerfile>

Risk: Safe

What it does

Proofreads a Dockerfile and lists risky lines, like a latest base image.

When to use it

Before every build, on every pull request.

Example

$ hadolint Dockerfile

Check the recipe. A finding exits with code 1.

$ hadolint --failure-threshold error Dockerfile

Only errors fail; warnings are just printed.