Concepts
Secrets
How secrets reach a build and a container, and what to do per team size.
Ant stores no secret values of its own: no vault, no encrypted field, no
secret in ant.yaml, the lockfile, or the machine state. A secret in ant is a
reference by name; the value is resolved at deploy time on the machine running
the deploy and handed straight to Docker.
- Runtime secrets become container environment variables, passed through
the docker process environment (compose uses a 0600
secrets.envon the worker) — never argv, never a stored compose document. - Build-time secrets (
build_time: true) are available to the builder for one build and are not baked into the image or the lockfile. - Providers resolve on demand:
from: op://…(1Password),cmd:…(Vault, AWS,pass, anything that prints the value),env:…. The full schema is in Configuration.
What to know before relying on it
docker inspectshows runtime values. Docker records a container's environment, so anyone who can inspect the container on the machine can read them. That is the engine's storage, not ant's; use file-based secrets for compose or a runtime secret manager when that matters.- Everyone who can deploy must hold the values.
deployerandciresolve secrets from their own environment or provider, so the "deployer cannot see secrets" separation you may know from other tools does not exist here. Keep production values in a manager and grant read access there. - No rotation tracking. Ant cannot tell whether a rotated value reached a container: redeploy after rotating and verify with the provider or the app.
Patterns
| Team | Suggested pattern |
|---|---|
| Solo | a gitignored .env next to the project, or a password manager CLI as the from: provider |
| Small team | a shared manager (1Password, Vault) as the provider; CI passes its own values as masked variables; machine-side docker login for registries |
| Regulated | an external runtime secret manager injected into the container at start; file-based secrets for compose; keep the audit at the manager layer, since ant's audit log records deploys, not secret reads |
See Known issues for the accepted trade-off and the possible future machine-side store (write-only for deployers, injected by the worker).