Requirements
Your build environment must have the following components:Bazel
Version 7.7.1 (see
.bazelversion)Operating System
GNU/Linux with x86-64 architecture
Clang
Required for C++ compilation
SWIG
Interface generation tool
Some image targets require building with glibc ≤ 2.36. Known compatible platforms include Debian Bookworm and Ubuntu 22.04.
Additional Dependencies
- Bash - Shell scripting
- OpenSSL 1.1.1+ - Cryptographic operations
$PATH.
Quick Start
Make Variables
Some build targets use “Make” variables defined via the--define option. These can be set on the command line or in .bazelrc.
build/variables.bzl.
Containerized Builds
If your host machine doesn’t meet the requirements, use the containerized build environment.Using the Container Script
Theghcr.io/world-federation-of-advertisers/bazel container image provides a complete build environment. Use the tools/bazel-container script as a drop-in replacement for the bazel command:
The
tools/bazel-container script automatically specifies the appropriate host platform, so you should not use the --host_platform option when using it.Interactive Container Shell
For extensive development work, you can run a shell inside the container:TestContainer-based Tests
Running tests that use TestContainers inside Docker requires additional setup:- Follow the sibling Docker containers pattern
- Set
TESTCONTAINERS_RYUK_DISABLED=trueenvironment variable
tools/bazel-container script handles these configurations automatically.
Hybrid Development
If your host has a newer glibc version but meets other requirements, you can develop locally and use the container only for building/deploying images.Running Container-Built Targets on Host
On Linux, thetools/bazel-container script writes output to bazel-container-output in your working directory. Use the tools/bazel-container-run script to generate executable scripts:
Build Targets
Test All
Build Images
Run Target
Container Build
Local Kubernetes
You can deploy a minimal testing environment in a local Kubernetes cluster for development and testing purposes.Next Steps
Testing
Learn how to run and organize tests
IntelliJ Setup
Configure your IDE for development