hadolint
Dockerfile linter. tldr-pages
On several platforms
Several platforms
Lint a Dockerfile
hadolint path/to/DockerfileIdentifyLint a Dockerfile, displaying the output in JSON format
hadolint --format json path/to/DockerfileIdentifyLint a Dockerfile, displaying the output in a specific format
hadolint --format tty path/to/DockerfileIdentifyLint a Dockerfile ignoring specific rules
hadolint --ignore DL3006 --ignore DL3008 path/to/DockerfileIdentifyLint multiple Dockerfiles using specific trusted registries
hadolint --trusted-registry docker.io --trusted-registry example.com:5000 path/to/Dockerfile1 path/to/Dockerfile2 ...Identify