Overview
fjall build builds Docker images and pushes them to Amazon ECR. Use it in CI/CD workflows that separate the build and deploy steps.
Prerequisites
| Requirement | Why |
|---|---|
| Infrastructure deployed | Run fjall deploy <app> at least once to create the ECR repository |
| Docker running | The Docker daemon must be running locally |
| AWS credentials | Valid AWS credentials with ECR access |
Usage
Arguments
| Argument | Description | Required |
|---|---|---|
app | Application name | Yes |
service | Specific service to build | No |
Options
| Option | Description | Example |
|---|---|---|
--target <target> | Docker build target stage | --target production |
--output-image-url | Print the image URL for CI capture | --output-image-url |
-v, --verbose | Show detailed output | -v |
--non-interactive | Force plain CLI output | --non-interactive |
Basic Usage
Build all services in an application:CI/CD Workflow
The build command suits CI/CD pipelines that:- Build and push images.
- Run tests against the built image.
- Deploy with the pre-built image.
Example: GitHub Actions
Example: Buildkite
Output
Standard Output
With —output-image-url
When you pass--output-image-url, the command prints machine-readable values:
IMAGE_URL contains the last built image. ALL_IMAGE_URLS contains a comma-separated list of all images when building multiple services.
Docker Build Targets
If your Dockerfile uses multi-stage builds with named targets:Troubleshooting
ECR Repository Not Found
Docker Build Failed
Authentication Failed
Next Steps
Deploy an Application
Deploy your built image to AWS
fjall deploy
Full reference for the deploy command