qmetrics.net

Hadolint

Haskell linter for Dockerfile best practices

Hadolint parses Dockerfiles into an AST and applies style and safety rules, including ShellCheck on bash inside RUN lines. It runs locally, in CI, or via container images.

Overview

Hadolint is a static checker focused on Dockerfiles. It reads each instruction, builds an abstract syntax tree, and evaluates rule sets on top of that structure. Bash snippets embedded in RUN commands are passed to ShellCheck for shell-specific warnings.

You can run the binary directly, install through Homebrew, Scoop, Nix, or distribution packages, or pipe a Dockerfile into an official container on Docker or Podman. Prebuilt binaries cover macOS, Windows, and Linux when package managers are not an option.

YAML configuration files set ignored rules, trusted image registries, severity overrides, and failure thresholds. Per-line and file-wide ignore pragmas in the Dockerfile itself suppress specific rule codes. Optional label schemas validate that required image labels exist and match formats such as semver, URLs, or SPDX identifiers.

Hundreds of DL-prefixed rules cover WORKDIR usage, package pinning, USER choices, and instruction ordering, while SC-prefixed findings come from ShellCheck. Editor, CI, and pre-commit integrations are documented for teams that want continuous feedback while writing images.

Key features

  • Dockerfile AST rule checks
  • ShellCheck on RUN bash
  • YAML and CLI configuration
  • Inline and global ignore pragmas
  • Label schema validation
  • Trusted registry warnings
  • Container and binary installs
  • CI and editor integrations

Use cases

  • CI gates on image definitions
  • Catching Dockerfile anti-patterns
  • Enforcing label metadata standards
  • Local pre-commit Dockerfile review

Tags

Similar software

Dive

Terminal explorer for Docker image layers

Dive inspects container images layer by layer to show what changed and where space is wasted. It helps shrink Docker or OCI images during development and CI.

★ 54.8k⟳ 11 days agoMIT

Nx

Monorepo build system with caching and CI integration

Nx manages TypeScript and polyglot monorepos with task graph awareness, local and remote caching, and CI helpers. It can be added to existing npm, pnpm, or yarn workspaces.

★ 29.5k⟳ todayMIT

PostCSS

JavaScript toolkit for transforming CSS via plugins

Parses CSS into an AST and runs JavaScript plugins to lint, prefix, nest rules, inline assets, and apply other style transforms in build pipelines.

★ 29k⟳ yesterdayMIT

Emscripten

LLVM toolchain compiling C and C++ to WebAssembly

Emscripten turns C and C++ into WebAssembly via LLVM and Binaryen. Output runs in browsers, Node.js, and other WebAssembly runtimes.

★ 27.8k⟳ 2 days agoMIT · open core

Oxc

Rust-based JavaScript and TypeScript compiler toolkit

Oxc bundles a parser, linter, formatter, transformer, resolver, and minifier for JavaScript and TypeScript. Oxlint and Oxfmt run via npx for everyday lint and format tasks.

★ 23.6k⟳ todayMIT

Slim

Container inspection, minification and security profiling CLI

SlimToolkit is a command-line toolkit for inspecting, shrinking and hardening container images without rewriting your Dockerfile. It analyzes what your application actually needs and strips unused layers and files.

★ 23.6k⟳ 2 months agoApache-2.0