Skip to main content
1

Install tally

Pick your preferred package manager:
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):
tally discovers files matching Dockerfile, Dockerfile.*, *.Dockerfile, Containerfile, and Containerfile.*.To make the same lint command available through Docker, register the Docker CLI plugin:
3

Lint a Bake or Compose entrypoint

If your build is defined by Docker Buildx Bake or Docker Compose, pass that file directly:
Use --target for Bake targets or groups and --service for Compose services:
See Build invocations for context handling, output attribution, and limitations.
4

Read the output

By default tally prints human-readable output with source snippets:
Exit code 1 means violations were found. Exit code 0 means clean.
5

Apply safe fixes

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

Add a config file

Create .tally.toml in your project root to set defaults for your whole team:
.tally.toml
Config is discovered automatically — no --config flag needed.
7

Enable context-aware rules

In direct Dockerfile mode, pass --context to unlock rules that check .dockerignore interactions:
Bake and Compose entrypoints derive the build context from the selected target or service, so they do not use --context.
8

Suppress a violation inline

Use an inline directive to suppress a specific rule on the next line:
Add a reason to document why:

Lint from stdin

Pass - as the filename to read from stdin. Useful in pipelines:
With --fix, the fixed content is written to stdout:

Next steps

Configuration

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

Build invocations

Lint Dockerfiles through Bake targets and Compose services.

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.