Repository navigation
feat(images): a runtime base of Wolfi packages built with apko - #411
Merged
Merged
Conversation
The data plane image ran on cgr.dev/chainguard/glibc-dynamic, whose free tier publishes `latest` only, and the control plane on Debian 12 slim. Both now run on a base the repository defines: - docker/runtime.apko.yaml lists wolfi-baselayout, ca-certificates-bundle, glibc-2.44, ld-linux-2.44 and libgcc from packages.wolfi.dev, and the nonroot user (65532) with its home; docker/runtime.apko.lock.json pins every package by version and checksum. - Both Dockerfiles build the base from the lock in a stage of their own (apko v1.4.15, on the build platform, for the target architecture) and copy its files under the binary on scratch. The release, CI's image job and `make docker-build` build them as before. - The binaries are built with `cargo auditable`, so scanners read their crates. - `barbacane-control health` calls /health and exits 0 on 200: the control-plane image has no shell, and its HEALTHCHECK runs it. - The Runtime base workflow scans the base and the latest release's images every night, and pushes a newer lock to deps/runtime-base; Actions may not open pull requests here, so a person opens it. - CI's image job checks the two images hold no shell or package manager, the home belongs to 65532, /tmp is 1777 and the apk database is there. The prototype in #404 measured the gateway on this base against today's image: same throughput and latency on a mock and a proxied route (0.99 and 1.00), same peak memory (1.01), 18.0 MB against 19.3 MB, and a default Grype scan finds no OS matches on either. Debian's glibc on scratch had cost up to 10% on proxied routes and listed 31 to 33 CVEs; static musl ran 4x slower (#409). The lock comes from the Runtime base workflow's first run on this branch. Refs #397.
glibc-2.44 and its loader and POSIX locale at 2.44-r23, libgcc 16.2.0-r5, ca-certificates-bundle 20261020-r0 and wolfi-baselayout 20230201-r31, for amd64 and arm64, as the Runtime base workflow locked them (run 44397561698).
This was referenced Nov 18, 2026
ndreno
marked this pull request as ready for review
November 18, 2026 21:25
This was referenced Nov 18, 2026
ndreno
added a commit
that referenced
this pull request
Nov 19, 2026
The release builds every image for linux/amd64 and linux/arm64, each on a native runner, but CI built amd64 only, so a tag was the first time an arm64 image was built. Since #411 the Dockerfiles also run apko for the target architecture, which no arm64 build has exercised yet. The image job now runs each image on both architectures, on the runners the release uses: build, run the binary, check the files on the runtime base, and the release's Grype scan.
ndreno
added a commit
to barbacane-dev/playground
that referenced
this pull request
Nov 19, 2026
* Check the control plane with `barbacane-control health` From barbacane-dev/barbacane#411 on, the barbacane-control image has no shell, so the compose health check `bash -c 'echo > /dev/tcp/...'` cannot run and the container stays unhealthy. The image ships `barbacane-control health`, which calls GET /health; the check runs it. CI did not notice: the smoke test reaches the control plane over HTTP and nothing waits for its health check. A new step after the smoke test requires every running service with a health check to report healthy. 1.0.0-rc.1 has no `health` subcommand, so this goes in with the bump to the first release that has it. Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev> * Pin the playground to Barbacane 1.0.0-rc.2 The control-plane health check runs `barbacane-control health`, which first ships in 1.0.0-rc.2, so that release is also the new minimum. --------- Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #397.
barbacaneandbarbacane-controlmove to a runtime base this repository defines and builds: Wolfi packages installed by apko from a committed lock. It replaces Chainguard'sglibc-dynamic(free tier:latestonly) under the data plane and Debian 12 slim under the control plane. The prototype and its measurements are in #404.What changes
docker/runtime.apko.yaml:wolfi-baselayout,ca-certificates-bundle,glibc-2.44,ld-linux-2.44andlibgccfrompackages.wolfi.dev, andnonroot(65532) with its home. No shell, no package manager.docker/runtime.apko.lock.jsonpins every package by version and checksum.Dockerfile,Dockerfile.control: aruntimestage runs apko v1.4.15 on the build platform and installs the locked packages for the target architecture; the final stage isscratchwith those files and the binary. The release, CI's image job andmake docker-buildbuild them unchanged. The binaries are built withcargo auditable, so scanners read their crates (in proto(images): a runtime base built with apko from Wolfi, checked in CI (#397) #404 Grype found two GitHub-only advisories thatcargo denycannot see, fixed in chore(deps): tar 0.4.46 and rand 0.8.6 #410).barbacane-control health:GET <url>/health, exit 0 on200within 5 s, 1 with the reason otherwise. The control-plane image'sHEALTHCHECKruns it, since the image has no shell.nonroot(65532, home/home/nonroot) in place of thebarbacanesystem user. Breaking for a health check that runs a shell command in the container; CHANGELOG and the migration guide say what to use.Runtime baseworkflow: every night, scans the base from the committed lock and the latest release's three images (high or critical with a fix fails), and locks again; a newer lock goes todeps/runtime-base. Actions may not open pull requests in this repository, so a person opens it, which also starts CI. On a pull request touching the base, it locks and scans without pushing./home/nonrootbelongs to 65532,/tmpis 1777, and the apk database scanners read is there.barbacane-control health), control-plane guide, migration guide, FIPS guide, contributor guide (how the base is locked and refreshed); CHANGELOG.The base is built inside each Dockerfile rather than published and pinned by digest: there is no Dependabot here and Actions cannot open pull requests, so a published base would need a hand-made digest bump after every publish. The lock gives the same pinning, and each lock change is built and scanned in its own pull request. Publishing the base for other repositories is one more build target if one needs it.
Measured in #404 (gateway, same commit, both run as containers)
glibc-dynamic)Not in this pull request
healthsubcommand for the data plane: its image has had no shell since 1.0.0-rc.1, and orchestrators probe it over HTTP.barbacane-standalonekeeps Debian and its shell.bash; it needs["CMD", "/usr/local/bin/barbacane-control", "health"]when it moves to a release with this change.Checks
barbacane-control healthagainst a local server: 200 exits 0, 404 and a closed port exit 1 with the reason.barbacane) and 298 (barbacane-control);health_succeeds_only_when_the_control_plane_answers_200passes; theRuntime baseworkflow locks and scans the base.barbacane-control healthplayground#9 (draft until a release includes this). Its CI on 1.0.0-rc.1 shows the control plane unhealthy (unrecognized subcommand 'health') and the gateway healthy.