CheckOps home

Tools directory

H

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.

Visit website

Latest public signals

Last updated: 11 November 2026 (page expanded from the official README or site).

Visit Website

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

  1. Dockerfile rules: Best-practice checks such as pinning versions.
  2. ShellCheck integration: Lints shell in RUN steps.
  3. Config file: Ignore rules and set trusted registries.
  4. Editor and CI integrations: Many integrations listed in the README.
  5. Docker image: Run with docker run.

Pros

  1. Free to use: Open source under GPL-3.0.
  2. Maintained: Commits as recent as 19 October 2026.
  3. Community: About 12,500 GitHub stars.

Cons

  1. Dockerfile only: Does not scan built images.
  2. GPL-3.0: Check licence if you embed it.
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.

  1. Teams writing Dockerfiles.
  2. CI pipelines enforcing image hygiene.
  3. 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.