Hadolint

What Hadolint is
Hadolint is a free, open-source Dockerfile linter that checks files for errors and best practices. It parses Dockerfiles into an abstract syntax tree and applies rules to that structure. For Bash code inside Dockerfile RUN instructions, it uses ShellCheck. Hadolint rules carry the DL prefix, while ShellCheck rules use SC. Users can ignore rules, override severity, set failure thresholds, choose report formats, and configure label schemas and trusted registries. Reports can use formats including JSON, Checkstyle, Code Climate, GNU, SonarQube, SARIF and JUnit. Hadolint can run as a pre-commit hook or inside Docker and Podman containers. Prebuilt binaries are offered for macOS, Windows and Linux, with installation options including Homebrew, Scoop, Nix and source builds. The project documents CI integrations such as GitHub Actions, GitLab CI, Azure DevOps Pipelines, Bitbucket Pipelines, CircleCI, Drone CI, Jenkins and Travis CI. Editor integrations include VS Code, Atom, Emacs, Geany, Sublime Text, Vim and NeoVim. An online version is hosted at hadolint.github.io/hadolint. The repository identifies its license as GPL-3.0.
Who it suits
Hadolint suits developers who want configurable Dockerfile checks in a local, container, editor or CI workflow. Its ShellCheck integration is relevant for files with Bash code in RUN instructions.
What it does well
- Checks Dockerfile structure against configurable rules.
- Uses ShellCheck for Bash in RUN instructions.
- Offers multiple report formats.
- Documents CI and editor integrations.
- Available as a pre-commit hook.
What to know first
- Its scope is Dockerfile linting.
- Bash analysis applies to RUN instructions.
- The project is licensed under GPL-3.0.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Hadolint | Open-source Dockerfile linter · GPL-3.0 | Free |
As github.com lists them, read 8 Oct 2026. The maker's own page has the final word.
Getting started
- Open the Hadolint GitHub repository or its online version.
- Choose an installation route such as a prebuilt binary, package manager, container, or source build.
- Run Hadolint on a Dockerfile.
- Configure ignored rules, severity, thresholds, or output format as needed.
- Add it to a documented CI workflow, editor, or pre-commit hook if useful.
Hadolint is a free, open-source linter for developers who want focused checks on Dockerfiles and the shell commands inside them. It is a strong fit for container-build workflows, but not for teams looking for analysis across an application’s programming languages.
Overview
Hadolint parses Dockerfiles into an abstract syntax tree and applies its own DL-prefixed rules. It also uses ShellCheck to check Bash inside RUN instructions, so a single tool can flag both Dockerfile issues and problems in embedded shell. That combination is useful when container definitions are part of the code a team reviews; its deliberately narrow scope means other code still needs its own analyzers.
The project is free under the GPL-3.0 license, with a published free plan at no cost. It also has an online version, alongside options for local use and integration into development workflows.
Key features
Users can ignore rules, override their severity, set failure thresholds, and configure label schemas and trusted registries. These controls let teams adapt checks to their policies and decide which findings should block a build. The tradeoff is that teams need to choose and maintain those settings rather than rely on a single fixed enforcement policy.
Output options include terminal display and formats such as JSON, Checkstyle, Code Climate, GitLab Code Climate, GNU, Codacy, SonarQube, SARIF, and JUnit. The range suits teams that need to feed findings into different reporting workflows, while still requiring them to choose an appropriate format and connect it to their process.
Hadolint can run in Docker or Podman containers, with images published on Docker Hub and GitHub Container Registry. Prebuilt binaries are offered for OSX, Windows, and Linux; installation is also described through Homebrew, Scoop, Nix, containers, or source builds. The project documents CI integrations for GitHub Actions, GitLab CI, Azure DevOps Pipelines, Bitbucket Pipelines, CircleCI, Drone CI, Jenkins, and Travis CI. Editor integrations include VS Code, Atom, Emacs, Geany, Sublime Text, Vim, and NeoVim, and a pre-commit hook is available, including a Docker-based option. This breadth makes it easier to fit Hadolint into an existing workflow, though it does not expand what the linter analyzes.
Pricing
Hadolint has one free plan, priced at $0, and no free trial. The plan is an open-source Dockerfile linter under GPL-3.0; there are no paid tiers described, so there is no higher plan with additional capabilities or a different usage allowance to weigh. It suits individual developers and teams who want Dockerfile linting without a software charge and are comfortable with the project’s open-source license.
Platforms
Hadolint is listed for Linux, macOS, web, and Windows. Its documented installation routes include prebuilt binaries for OSX, Windows, and Linux, package managers, containers, and source builds; its README also links to an online version. That mix accommodates both local development and browser access, while container and CI options support automated checks.
Who it's for
Hadolint is best for developers and teams maintaining Dockerfiles who want repeatable checks in an editor, pre-commit hook, or CI pipeline. Its embedded Bash analysis is especially useful when shell commands in RUN instructions are an important part of the build. It is not the right standalone choice for broad code-quality coverage: projects need additional tools for languages and files outside its Dockerfile-and-Bash remit.
Pros and cons
- Pro: Combines Dockerfile rules with ShellCheck analysis of Bash in RUN instructions, covering two relevant parts of a container build in one linter.
- Pro: Offers configurable rule handling and numerous report formats, letting teams tune enforcement and fit findings into existing reporting flows.
- Pro: Has documented integrations across major CI systems, editors, and pre-commit, with a free, open-source plan.
- Con: Its scope is limited to Dockerfiles and Bash inside RUN instructions, so it cannot replace analyzers for application code.
- Con: The many configuration controls require teams to settle on their own rule and failure policies.
Alternatives
For other tools in this category, browse Linters. Choose actionlint instead for a free, MIT-licensed static checker with a command-line tool and browser playground. Biome is a free, open-source toolchain for web projects, so it fits a different focus than Hadolint’s container-build checks.
Cppcheck is worth considering for core static analysis functionality, with a free-to-download Open-source plan and a Project plan with custom pricing. JSHint is another free option for readers looking for a publicly available tool with no paid plans stated. For a downloadable static code analyzer under a BSD-style license, consider PMD.
Ruff is the alternative to consider for a tool in the Python ecosystem; its maker says its developer tools are open source and permissively licensed. Choose ShellCheck instead when the priority is static analysis for shell scripts across web, terminal, and editor use, rather than Dockerfile linting. SwiftLint is a free, MIT-licensed option for Swift linting.
Verdict
Choose Hadolint if Dockerfiles are a regular part of your build workflow and you want configurable checks that cover embedded Bash as well as Dockerfile rules, at no software cost. Its editor, pre-commit, container, and CI integrations make it a practical specialist. Look elsewhere—or pair it with other analyzers—if your priority is code-quality coverage beyond Dockerfiles and their RUN commands.
Verdict
Hadolint offers configurable Dockerfile checks and integration options across development workflows. Its focus is narrow by design: it checks Dockerfiles and Bash code within RUN instructions.
Questions
Does Hadolint cost anything?
Hadolint is free. Its listed plan costs nothing.
Is Hadolint open source?
Yes. The repository identifies its license as GPL-3.0.
Which platforms are listed?
Linux, macOS, web, and Windows are listed. Prebuilt binaries are offered for Linux, macOS, and Windows, and an online version is available.
Can it check shell commands in Dockerfiles?
Yes. Hadolint uses ShellCheck to lint Bash code inside Dockerfile RUN instructions.
What integrations are documented?
CI examples include GitHub Actions, GitLab CI, Azure DevOps Pipelines, and Jenkins. Editor options include VS Code, Vim, and Emacs, and Hadolint is also available as a pre-commit hook.
What output formats does it support?
Formats include tty, JSON, Checkstyle, Code Climate, GitLab Code Climate, GNU, Codacy, SonarQube, SARIF, and JUnit.
Facts from Hadolint's own pages
- Bash analysis
- It uses ShellCheck to lint Bash code inside Dockerfile RUN instructions. · github.com, 8 Oct 2026
- CI integrations
- The project documents integrations including GitHub Actions, GitLab CI, Azure DevOps Pipelines, Bitbucket Pipelines, CircleCI, Drone CI, Jenkins, and Travis CI. · github.com, 8 Oct 2026
- Configuration
- Users can configure ignored rules, severity overrides, failure thresholds, output format, label schemas, and trusted registries. · github.com, 8 Oct 2026
- Container use
- Hadolint can run from Docker or Podman container images published on Docker Hub and GitHub Container Registry. · github.com, 8 Oct 2026
- Downloads
- Prebuilt binaries are offered for OSX, Windows, and Linux, with installation also described through Homebrew, Scoop, Nix, containers, or source builds. · github.com, 8 Oct 2026
- Editor integrations
- Documented editor integrations include VS Code, Atom, Emacs, Geany, Sublime Text, Vim, and NeoVim. · github.com, 8 Oct 2026
- Latest release
- The release page opened for this research lists v2.15.1 as the latest release. · github.com, 8 Oct 2026
- License
- The repository identifies its license as GPL-3.0. · github.com, 8 Oct 2026
- Online version
- The README links to an online version hosted at hadolint.github.io/hadolint. · github.com, 8 Oct 2026
- Output formats
- Supported report formats include tty, json, checkstyle, codeclimate, gitlab_codeclimate, gnu, codacy, sonarqube, sarif, and junit. · github.com, 8 Oct 2026
- Parsing
- The linter parses Dockerfiles into an abstract syntax tree and applies rules to it. · github.com, 8 Oct 2026
- Pre-commit
- Hadolint is available as a pre-commit hook, including a Docker-based hook option. · github.com, 8 Oct 2026
- Purpose
- Hadolint is a Dockerfile linter that checks Dockerfiles for errors and best practices. · github.com, 8 Oct 2026
- Rule sources
- Its rules include Hadolint rules with the DL prefix and ShellCheck rules with the SC prefix. · github.com, 8 Oct 2026
Where Hadolint stands on Freedom251
- Linters#10 of 33