ci: build the image with buildah instead of the host docker daemon #2
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mobrule/mobrule-ci!2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/buildah-image-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The image build fails with:
Not a Containerfile problem — the build never starts.
docker logintalks to the registry rather than the daemon, so the first daemon contact isdocker build, and that is where it dies.Permission denied, not "no such file": the socket is mounted, the job just cannot use it. That is a property of the runner host — socket ownership, mode, or which uid the job container runs as — and this repo has no way to control it or to notice when it changes. It worked before and stopped working without anything here changing.
The fix
Build with buildah. It is daemonless: no socket, no group membership, nothing outside the job that has to keep working. The failure mode stops existing rather than getting patched.
Three flags are load-bearing, and each was established by running it rather than by reading documentation:
--storage-driver vfscruninstalled alongsidebuildahbuildahpackage pulls no OCI runtime. Without one, everyRUNfails witherror running container: ... exec: no command.--isolation chrootThe
crunone is worth noting: without it the failure isexec: no command, which reads like a broken Containerfile rather than a missing dependency. That cost a debugging cycle locally and would have cost a red CI run otherwise.Rehearsed, not assumed
Ran buildah inside an unprivileged
ubuntu:24.04container — the closest local analogue to the job environment — building a Containerfile and reading a value back out of the built image:The first attempt, without
crunand with default isolation, failed exactly as described above. That is why both are in here.Also added
A verification step. After pushing, it pulls the first tag back and runs
spacetime --versioninside it. The Containerfile already asserts the version during build, but that only proves the layer built — not that this is what reached:latest. What consumers pull is the whole point of pinning, so that is what gets checked.A diagnostics step printing
id,buildah version, and the socket's status. Cheap, and it is the evidence anyone needs if this environment shifts again.Unblocks
mobrule#273 (the SpacetimeDB 2.8.1 crate bump) cannot go green until an image carrying the pinned CLI is published —check-bindings-sync.shregenerates bindings with whatever CLI the container has and fails on any diff.