← All open source projects

Hadolint

hadolint/hadolint

Hadolint is a Dockerfile linter that parses instructions and checks embedded shell code through ShellCheck.

Forks 495
Author hadolint
Language Haskell
License GPL-3.0
Synced 2026-06-27

In Short

Hadolint helps write cleaner Dockerfiles: it parses the file into an AST, applies rules, and checks shell commands inside RUN instructions.

What It Is

Hadolint is a Dockerfile linter written in Haskell. It is useful where container images need to be repeatable, safe, and understandable to the team.

What Is Inside

The project parses a Dockerfile into a tree and applies rules on top of that structure. For shell code inside `RUN`, it uses ShellCheck ideas, so validation is not limited to Docker instructions.

How People Use It

Hadolint is usually run locally, in checks before merging changes, or in build systems. It quickly shows where a Dockerfile violates image-building practices.

Example

Dockerfile Check

The command checks a Dockerfile and returns warnings about structure and shell instructions.

Language: Bash
hadolint Dockerfile

Strengths

Hadolint’s strength is early feedback. Dockerfile mistakes often appear late and expensively, while the linter catches many issues before image build.

Limits

The limitation is project context. Not every warning has the same weight; some rules can be consciously disabled when the team understands the tradeoff.

Project Context

Hadolint is maintained in the hadolint/hadolint repository; its public history starts on 2015-11-15. The primary metadata language is Haskell, and the license is GPL-3.0.

This context keeps the page grounded in a specific repository: the project has an owner, technical base, license, change history, and real constraints of its ecosystem.

Hadolint should be evaluated through a concrete scenario: who will maintain it, where it fits in the existing stack, which updates must be tracked, and what happens if it fails. That view is more useful than installing a project just because it is popular, because open source helps only when its role in the system is clear to the team.