hadolint

Dockerfile linter.

TLDR

Lint a Dockerfile

$ hadolint [path/to/Dockerfile]
copy

Lint a Dockerfile, displaying the output in JSON format

$ hadolint --format [json] [path/to/Dockerfile]
copy

Lint a Dockerfile, displaying the output in a specific format

$ hadolint --format [tty|json|checkstyle|codeclimate|codacy] [path/to/Dockerfile]
copy

Lint a Dockerfile ignoring specific rules

$ hadolint --ignore [DL3006] --ignore [DL3008] [path/to/Dockerfile]
copy

Lint multiple Dockerfiles using specific trusted registries

$ hadolint --trusted-registry [docker.io] --trusted-registry [example.com]:[5000] [path/to/Dockerfile] [path/to/another/Dockerfile]
copy

Copied to clipboard
free 100$ digital ocean credit