dbuild
What is dbuild?
dbuild is the primary build engine for the Daemonless project. It provides a unified interface for building, testing, and publishing FreeBSD OCI container images, ensuring consistency between local development and CI/CD environments.
It bridges the gap between modern OCI image standards and native FreeBSD Jails. By handling the complexity of ocijail, networking, and jail annotations automatically, dbuild allows you to focus on your application logic rather than system administration.
FreeBSD Port
dbuild is available as a native FreeBSD port: sysutils/py-dbuild.
- Maintainer: dtxdf@FreeBSD.org
- FreshPorts: https://www.freshports.org/sysutils/py-dbuild/
The Lifecycle
dbuild manages the entire journey of a container image through three main phases:
- Build: Automatically detects
Containerfilevariants and builds native FreeBSD images using Podman. - Test: Executes Quality Gates (CIT) to validate port bindings, health endpoints, and visual regressions.
- Publish: Handles multi-arch tagging, registry authentication, and SBOM generation.
Key Features
- Multi-variant builds: Automatically detects
ContainerfileandContainerfile.<variant>(e.g..pkg). - Architecture awareness: Maps standard names (
x86_64,arm64) to FreeBSD conventions (amd64,aarch64). - Quality Gates: Integrated testing that blocks registry pushes if validation fails.
- Documentation Automation: Renders
README.mdandContainerfilefromcompose.yamlmetadata. - CI First: Designed to run identically on local machines, GitHub Actions, and Woodpecker CI.
Installation
dbuild requires Python 3.11+ and Podman.
# Install dbuild from source
git clone https://github.com/daemonless/dbuild
cd dbuild
doas make install
Quick Start
Jump straight into building your first FreeBSD container image:
Build and push all variants
Initialize from a FreeBSD Port
Run specific tests
Next Steps
- Review the Command Reference for full CLI details.
- Learn how to configure your project in the Configuration Guide.
- Deep dive into testing with the Quality Gates (CIT) Guide.
- Understand the CI/CD Pipeline and how to automate your builds.