Bake targets
Lint the targets from
docker-bake.hcl or docker-bake.json.Compose services
Lint services with a
build: section from compose.yaml.Build context
Use the orchestrator’s context instead of repeating
--context.Editor context
Attach Bake or Compose context to Dockerfile diagnostics in LSP clients.
Supported entrypoints
tally lint still uses one command. The behavior depends on the explicit path you pass.
Directory and glob inputs keep their Dockerfile discovery behavior. This means
tally lint . does not search for compose.yaml or
docker-bake.hcl; pass those files explicitly when they are the build source of truth.
Dockerfile mode and --context
For direct Dockerfile linting, use --context when rules need access to files in the build context:
.dockerignore or on files copied into the image.
When you lint a Bake or Compose entrypoint, do not pass --context. tally derives the primary build context from the selected target or service.
Docker Buildx Bake
Lint all targets in the Bake default group:--target:
docker-bake.hcl
contextbecomes the primary build context.dockerfileselects the file to lint.argswith concrete values are available to Dockerfile analysis.targetselects the effective final stage.platformsare available to platform-aware checks.contextsare preserved as named build contexts.
Bake limitations
Docker Compose
Lint all active services with abuild: section:
--service:
compose.yaml
api and worker produce lint invocations. redis does not, because it has no build: section.
tally preserves both build-time and selected runtime metadata:
build.context,build.dockerfile,build.args,build.platforms,build.target, andbuild.additional_contexts- service
platformwhenbuild.platformsis not set - service
environment,ports,expose,labels,networks,secrets,healthcheck,entrypoint,command,user,working_dir, andstop_signal
Compose limitations
Build contexts
The primary context is the context used for regularCOPY and ADD sources.
Only local directory contexts let tally evaluate
.dockerignore and read files copied by COPY or ADD. Remote and non-directory contexts are
valid invocation metadata, but tally does not fetch them during linting.
Named contexts are tracked separately from the primary context. They are available to rules that need to know that a name was declared, but they do
not make files locally readable unless a future rule explicitly supports that context kind.
Output and attribution
When an orchestrator produces more than one invocation, tally keeps diagnostics separate even if multiple invocations point at the same Dockerfile. Text output groups findings by invocation:Invocation column.
Fixes
--fix is not supported when the lint entrypoint is a Bake or Compose file:
2. A single Dockerfile can be linted under multiple invocation contexts, and applying one text edit through an orchestrator
entrypoint could be wrong for another target or service.
To apply fixes, lint the Dockerfile directly:
LSP and editor use
The LSP server remains Dockerfile-document-centric. To attach orchestrator context to Dockerfile diagnostics, configure invocation entrypoints in your editor or LSP client. User-facing setting:tally/bake:api or tally/compose:worker.
Mutating code actions are only shown when the requested diagnostic or range belongs to one invocation context. Broad fix-all actions are disabled
when the selected diagnostics span multiple invocation contexts.
Exit codes
Orchestrator entrypoints use the same exit-code family as Dockerfile linting:
Exit code
3 remains the Dockerfile discovery “no files found” case for directory and glob inputs. A valid orchestrator file with zero buildable
targets or services exits 0, not 3.