Probe the runner's Docker and buildx capabilities #3
Labels
No labels
bug
enhancement
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#6 CI builds and smoke-tests the Image on every PR
vicoli-oss/docker-forgejo-mcp
Reference
vicoli-oss/docker-forgejo-mcp#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What to build
A manually dispatchable Forgejo Actions workflow on the
dockerrunner label (other labels available:ubuntu-latest,ubuntu-22.04,ubuntu-24.04) that reports what the runner can do for building the Image. It checks:docker buildxis available and which builders and platforms it listsPost the findings as a comment on this issue. If Docker access is missing, recommend the smallest fix: either the runner-admin change (
container.docker_host: automountor a privileged dind service, with the security trade-off stated) or a daemonless builder. Hand that decision back to the human instead of making it.Acceptance criteria
dockerlabelready-for-humanBlocked by
Context: see
GLOSSARY.md(Upstream, Upstream Version, Image, Rebuild, Consumer, Pin) anddocs/adr/(0001 build from Upstream source for multi-arch, 0002 canonical Upstream not the Codeberg mirror, 0003 tag scheme and immutable Rebuild tags).Runner probe results
I added
.forgejo/workflows/probe-runner.ymland dispatched it manually on thedockerlabel. It ran twice (runs #1 and #2 on branchpiscis/forgejo-runner-implement) and both finished successfully. The job usescontainer: image: docker:cli(Alpine 3.24), which ships the docker CLI and the buildx plugin, because the runner's default job image may have neither.Daemon reachable: yes, through the runner's docker-in-docker daemon, not a host socket.
DOCKER_HOST=tcp://docker_dind:2376(TLS) is set in the job container, and/var/run/docker.sockis absent.docker infoworks: Docker Engine 29.8.1, daemon namedocker_dind, OS "Alpine Linux v3.24 (containerized)".driver-type: io.containerd.snapshotter.v1), so the defaultdockerdriver can build and push multi-platform images without creating adocker-containerbuilder.buildx: v0.37.1, BuildKit v0.33.0, one builder:
default(driverdocker).buildx inspect, run #2):linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64. Run #1 only hadbuildx ls, which truncates the list tolinux/amd64 (+3), so which platforms existed before the first binfmt install isn't known.Host arch: x86_64 (
uname -manddocker infoagree). 4 CPUs, 7.75 GiB RAM, kernel 6.8.0-142-generic.arm64 emulation: available.
qemu-aarch64was not registered. Note that binfmt_misc isn't mounted in the job container, so/proc/sys/fs/binfmt_misccan't be read from inside the job.docker run --privileged tonistiigi/binfmt --install arm64works in-job (reportedinstalling: arm64 OK).docker run --platform linux/arm64 alpine uname -mprintedaarch64.qemu-aarch64 already registered. The registration is kernel-wide on the runner host and lasts until reboot. The build workflow should still run the binfmt install step every time rather than rely on it.Conclusion
Everything a multi-arch (amd64 + arm64) buildx build needs is present: a reachable daemon, buildx with the containerd image store, and arm64 emulation that the job can set up itself. The runner needs no admin changes and no daemonless builder. Per ADR 0001, Go cross-compiles natively, so QEMU is only needed for any
RUNsteps in the arm64 final stage.Side note: this Forgejo instance doesn't support job summaries (
::warning::This Forgejo instance does not support job summaries), so the probe also prints a full report as its last log step.