Skip to main content
1

Install tally

Pick your preferred package manager:
brew install wharflab/tap/tally
See Installation for WinGet, RubyGems, Docker, and from-source options.
2

Lint a Dockerfile

Run tally against a single file or an entire directory (recursive):
# Single file
tally lint Dockerfile

# All Dockerfiles in the current repo
tally lint .
tally discovers files matching Dockerfile, Dockerfile.*, *.Dockerfile, Containerfile, and Containerfile.*.
3

Read the output

By default tally prints human-readable output with source snippets:
WARNING: StageNameCasing - https://docs.docker.com/go/dockerfile/rule/stage-name-casing/
Stage name 'Builder' should be lowercase

Dockerfile:2
────────────────────
   1 │ FROM alpine
>>>2 │ FROM ubuntu AS Builder
   3 │ RUN echo "hello"
────────────────────
Exit code 1 means violations were found. Exit code 0 means clean.
4

Apply safe fixes

Many rules are auto-fixable. Apply all safe fixes with --fix:
tally lint --fix Dockerfile
--fix modifies files in place. Commit your changes before running it, or review the diff afterward.
5

Add a config file

Create .tally.toml in your project root to set defaults for your whole team:
.tally.toml
[output]
format = "text"
fail-level = "warning"

[rules]
include = ["buildkit/*", "tally/*", "hadolint/*"]
Config is discovered automatically — no --config flag needed.
6

Enable context-aware rules

Pass --context to unlock rules that check .dockerignore interactions:
tally lint --context . Dockerfile
7

Suppress a violation inline

Use an inline directive to suppress a specific rule on the next line:
# tally ignore=StageNameCasing
FROM alpine AS Build
Add a reason to document why:
# tally ignore=DL3007;reason=Pinning at CI level via Renovate
FROM ubuntu:latest

Lint from stdin

Pass - as the filename to read from stdin. Useful in pipelines:
cat Dockerfile | tally lint -
With --fix, the fixed content is written to stdout:
cat Dockerfile | tally lint --fix - > Dockerfile.fixed

Next steps

Configuration

Full reference for .tally.toml, environment variables, and CLI flags.

Auto-fix

Learn about safe and unsafe fixes, and per-rule fix modes.

Rules reference

Browse all rules across BuildKit, tally, Hadolint, and ShellCheck namespaces.

CI/CD integration

Add tally to GitHub Actions, GitLab CI, and other pipelines.