The gated Docker build
Generated page
Model gemma-mtp, commit f508a4b65b3f, 2026-08-15, sources: 6. Edit the code or the hand-written documentation instead.
Diagram
The gate and the distribution
To prevent packaging stale or broken code, docker-build.sh:22 executes the full check task via Gradle before any packaging occurs. This ensures that the installDist stage, which prepares the files for the image (docker-build.sh:27-29), only operates on a distribution that has passed all tests and linting.
The BOOBLIK_SKIP_GATE mode
For local development and debugging, the build can be bypassed using the BOOBLIK_SKIP_GATE=1 environment variable (docker-build.sh:12). When this mode is active, the script explicitly changes the build's truthfulness, labeling the resulting image as "WITHOUT THE GATE — from unchecked code" (docker-build.sh:25) instead of the standard "passed the gate" (docker-build.sh:19).
The image job lifecycle
The image job in build.yml:65 is decoupled from the check job to satisfy two requirements: it requires a Docker daemon which the standard check runner lacks (build.yml:63), and it must not fail the entire CI pipeline if a Docker-specific issue occurs, as the code correctness was already verified in the check job (build.yml:64).
The booblik:ci image verification
The verification of the booblik:ci image follows a strict sequence: first, the image is built via ./ci/docker-build.sh booblik:ci (build.yml:84), then it is subjected to runtime assertions in ci/docker-smoke.sh (build.yml:89), and finally, it is validated against a reference client via ./conformance/run.sh (build.yml:102).
The booblik-smoke assertions
The ci/docker-smoke.sh script performs deep inspection of the running container to ensure the runtime environment matches the measured profile. It verifies that:
- The process runs as the
booblikuser (docker-smoke.sh:95). - The JVM profile includes exactly six specific flags, such as
-Xmx64Mand-XX:+UseSerialGC(docker-smoke.sh:76-83). - The
booblik-healthtool can successfully query the broker'sMETADATA(docker-smoke.sh:87).
The booblik-smoke segment sparseness
To ensure the storage layer is efficient, docker-smoke.sh:104 checks that segment files are created as sparse files. It verifies that the BLOCKS count reported by stat is less than 2048, ensuring the segment has not been fully materialized on disk.
Key files
| File | Lines | What is there |
|---|---|---|
ci/docker-build.sh | 17-38 | Logic for gating, distribution, and image size reporting |
ci/docker-smoke.sh | 43-85 | Log awaiting mechanism and JVM flag verification |
…/workflows/build.yml | 14-90 | Definition of the check and image CI jobs |
Behaviour that surprises
- The
await_logfunction indocker-smoke.sh:43uses a loop and a local variable to readdocker logsinto a variable before matching, avoiding a SIGPIPE failure that occurs when pipingdocker logsdirectly intogrepunderset -o pipefail. - The
installDiststage indocker-build.sh:27is a prerequisite fordocker buildbecause the Dockerfile does not contain a build stage; it relies on the files already present in thebuild/installdirectory. - The
booblik-healthcheck indocker-smoke.sh:88is designed to fail if a port is "healthy" but no process is actually listening on it, by checking a secondary port that should have no service.