tally is a production-grade Dockerfile/Containerfile linter + formatter that keeps build files clean, modern, and consistent.
It uses BuildKit's official parser and checks (the same foundation behind docker buildx) plus a safe auto-fix engine. It runs fast,
doesn't require Docker Desktop or a daemon, and fits neatly into CI.
# Lint everything in the repo (recursive)
tally lint .
# Apply all safe fixes automatically
tally lint --fix DockerfileModern Dockerfiles deserve modern tooling. tally is opinionated in the right places:
- BuildKit-native: understands modern syntax like heredocs,
RUN --mount=...,COPY --link, andADD --checksum=.... - Fixes, not just findings:
--fixapplies safe, mechanical rewrites;--fix-unsafeunlocks opt-in risky fixes (including AI). - Modernizes on purpose: converts eligible
RUN/COPYinstructions to heredocs, prefers BuildKitADDsources for archives and git repos, and more. - Broad rule coverage: combines Docker's official BuildKit checks, embedded ShellCheck for shell snippets, Hadolint-compatible rules, and tally-specific rules.
- PowerShell-aware: parses full PowerShell syntax for semantic tokens and rule analysis, so PowerShell
RUNinstructions are treated as real code instead of opaque strings. - Windows-container aware: detects Windows container OS, understands Windows paths and default shells, and recognizes
cmd.exeand PowerShell-specific build patterns. - Registry-aware without Docker: uses a Podman-compatible registry client for image metadata checks (no daemon required).
- Editor + CI friendly: VS Code extension (
wharflab.tally, powered bytally lsp) and outputs for JSON, SARIF, and GitHub Actions annotations. - Easy to install anywhere: Homebrew, WinGet, Go, npm, pip, and RubyGems.
- Written in Go: single fast binary, built on production-grade libraries.
Quality bar: 92% code coverage on Codecov and 2,900+ Go tests executed in CI.
For installation, usage, configuration, rules reference, and more, visit the full documentation at tally.wharflab.com.
See CLAUDE.md for development guidelines.
GPL-3.0-only. See LICENSE for the full license text.