CheckOps
Hadolint
Hadolint is a GPL-3.0 Dockerfile linter written in Haskell that checks best practices and validates inline bash in RUN instructions using ShellCheck.
Latest public signals
Last updated: 11 November 2026 (page expanded from the official README or site).
Introduction
Hadolint is a Dockerfile linter that helps you build best-practice Docker images. It parses the Dockerfile into an AST and applies rules, and it uses ShellCheck to lint the bash code inside RUN instructions.
The source code is at hadolint/hadolint on GitHub under the GPL-3.0 licence, with about 12,500 stars; the most recent commit was on 19 October 2026.
Hadolint is a Dockerfile linter written in Haskell. It parses the Dockerfile into an abstract syntax tree and applies rules for best-practice images, and it uses ShellCheck to lint the Bash in RUN instructions. Typical findings include unpinned package versions, use of the latest tag, missing cleanup of package caches, and using ADD where COPY is appropriate. It runs as a binary, Docker image, pre-commit hook or CI action.
Where it fits: on CheckOps, Hadolint is listed alongside alternatives such as Dockle, Trivy, Checkov and KICS. When comparing them, check licence and hosting model, how results reach developers (pull requests, CI logs or dashboards), how much tuning is needed to keep noise low, and whether the project or vendor is actively maintained.
Features
- Dockerfile rules: Best-practice checks such as pinning versions.
- ShellCheck integration: Lints shell in RUN steps.
- Config file: Ignore rules and set trusted registries.
- Editor and CI integrations: Many integrations listed in the README.
- Docker image: Run with
docker run.
Pros
- Free to use: Open source under GPL-3.0.
- Maintained: Commits as recent as 19 October 2026.
- Community: About 12,500 GitHub stars.
Cons
- Dockerfile only: Does not scan built images.
- GPL-3.0: Check licence if you embed it.
Usage and Links (Example)
docker run --rm -i hadolint/hadolint < Dockerfile
Resources:
Getting started tips: run Hadolint against one representative image or cluster first, fix or accept the findings, and then add it to the CI pipeline or admission process so non-compliant images and workloads are caught before deployment. Rebuild images regularly, because new vulnerabilities and benchmark changes appear even when your code does not change.
Pricing
Hadolint is free and open source under the GPL-3.0 licence.
Recommended for?
- Teams writing Dockerfiles.
- CI pipelines enforcing image hygiene.
- Not a fit for image vulnerability scanning.
Conclusion
Hadolint is the standard Dockerfile linter.
As with any tool in this category, the value of Hadolint comes from running it consistently and acting on what it finds, so wire it into an existing workflow rather than treating it as an occasional audit.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with Hadolint side by side.
DDockleDockle is an Apache-2.0 container image linter for security that checks built images against best practices and CIS Docker Benchmark items.Compare with Hadolint
TTrivyTrivy is Aqua Security's Apache-2.0 all-in-one scanner for container images, filesystems, Git repos, VM images and Kubernetes, finding CVEs, IaC misconfigurations, secrets, licences and SBOM data.Compare with Hadolint
CCheckovCheckov is an Apache-2.0 static analysis tool for infrastructure as code (Terraform, CloudFormation, Kubernetes, Helm, Dockerfile and more) that also does SCA for images and open-source packages.Compare with Hadolint
KKICSKICS (Keeping Infrastructure as Code Secure) is Checkmarx's Apache-2.0 open-source scanner for security vulnerabilities, compliance issues and misconfigurations in infrastructure-as-code.Compare with Hadolint
KKubeLinterKubeLinter is StackRox's Apache-2.0 static analysis tool that checks Kubernetes YAML files and Helm charts against best practices for security and production readiness.Compare with Hadolint
DDocker ScoutDocker Scout is Docker's software supply-chain tool that analyses container images, builds SBOMs and gives near real-time, actionable insights and policy checks before images reach production.Compare with Hadolint