Overview
fjall build builds Docker images and pushes them to Amazon ECR. Use it in CI/CD pipelines that separate the build step from the deploy step, so you can test the exact image you are about to ship.
The command is non-interactive by design. It prints a three-step progress stream and, with --output-image-url, a machine-readable block your pipeline can parse.
Prerequisites
Usage
Arguments
Options
Agent flags
These flags shape output for AI-agent and scripted callers.Basic usage
Build every service in an application:Build arguments
--build-arg bakes a public value into the image at build time. It is repeatable, and it is the highest tier of the resolution ladder:
- A key is emitted when your
infrastructure.tsdeclares it, when you pass it via--build-arg, or when a key prefixedVITE_,NEXT_PUBLIC_orPUBLIC_is found in a parsed.envfile. - Shell environment variables override the value of an already-declared key. They never introduce a new key, so arbitrary host environment cannot leak into the image.
Build secrets
--build-secret passes a value to the build through BuildKit’s secret mount, so it never lands in an image layer. It is repeatable, and each token is a comma-separated list of key=value pairs: an id plus exactly one source.
ssm, secretsManager or env. A malformed token fails the whole command before any AWS work starts, so a typo never reaches a build silently.
CI/CD workflow
The build command suits pipelines that:- Build and push the image.
- Run tests against the pushed image.
- Deploy that exact image without rebuilding.
fjall ci run build <target> [service] wraps this command with a resolved
deployment target and CI deploy-token credentials. See fjall ci and the CI/CD integration guide.Example: GitHub Actions
--image-tag deploys the image the build step pushed, skipping the build and implying --deploy-only. It applies one tag family across the application’s services, so it fits applications whose services build from a single build group. For applications with independent build groups, deploy normally with fjall deploy api.
Example: Buildkite
Output
Standard output
Deploy this build line appears only when every built artefact shares one digest. When services build from separate build groups, the last line reads Deploy: fjall deploy api instead.
Image tags follow <service>-sha-<12 hex characters>, with a -<target> segment folded in for a multi-stage service. The tag identifies the service and the content of the build, not the git ref, so there is no --tag flag to override it.
Machine-readable output
Pass--output-image-url to print a parseable block:
Parse the per-service
IMAGE lines when you need a specific service’s tag. IMAGE_URL is the first artefact, not a summary of the build.
Docker build targets
If your Dockerfile uses multi-stage builds with named targets:Troubleshooting
ECR repository not found
EcrRepositoryName.
Fix: deploy the infrastructure once.
Docker build failed
AWS account ID unavailable
aws sso login or hand-edit ~/.aws/config. See Understanding profiles.
Wrong organisation
organisation binding in fjall-config.json does not match the organisation your credential belongs to. The gate refuses only on a proven mismatch, and it runs before the first AWS call.
Fix: authenticate as the bound organisation, or, if the project really is moving, rebind it by name.
Next Steps
Deploy an application
Ship the image you just pushed
fjall deploy
Full reference for the deploy command, including
--image-tagfjall ci
Run builds and deploys from a CI pipeline
CI/CD integration
Pipeline templates, tokens, and exit codes