Allow Dockerfile image builds with Podman #108
No reviewers
Labels
No labels
blocked
bug
duplicate
effort
high
effort
low
effort
medium
effort
minimal
enhancement
help wanted
invalid
pr
feedback
pr
reviewing
question
status
backlog
status
document
status
done
status
implement
status
pending
status
planning
status
reviewing
waiting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tepichord/milner!108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/107-dockerfile-image-builds-podman"
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?
Closes #107
A builder capability for consumer repositories: one named step per pipeline may run
podman build/podman pushin a pod that owns a user namespace (hostUsers: false), enabled by raising the worker'suser.max_user_namespacesto11255. Milner's own pipeline is unchanged — its images are derivations — and a suite guard makes "one step per pipeline" a count rather than a claim.What changed
worker/main.tfconfig_patchesentry:machine.sysctls."user.max_user_namespaces" = "11255"— asserted byworker/tests/plan.tftest.hcltests/test_static.pytest_a_user_namespaced_step_is_named_on_the_allowlist(empty here; the shape a consumer fills), plus the prose in the privileged-tier test, the enqueuer-image test and the "no container builder" tool listdocs/woodpecker-ci.mddocs/nix.mdUSER_STORIES.md,tests/test_docs.py20b.added, the story-sequence test widened for a suffixOPERATIONS.md,.woodpecker/gates.yaml,ARCHITECTURE.md,gitops/…/zot/README.mdAGENTS.mdtests/row records the invariant for whoever reads the mapProof, on this cluster
Item 1 — the sysctl is live.
terraform -chdir=worker applyreported0 added, 1 changed, 0 destroyed, in place, no reboot — Talos lists.machine.sysctlsinCanApplyImmediate, so the plan's worry about a reboot (and itsapply_moderemedy) did not apply. A throwaway pod then read/proc/sys/user/max_user_namespacesfrom the worker:11255.Item 2 — the build, the push, and the bytes. Throwaway pod in
woodpecker-runtime:hostUsers: false,quay.io/podman/stable:v5.8.7-immutable,STORAGE_DRIVER=vfs,BUILDAH_ISOLATION=chroot,seccompProfile: Unconfined, build context on anemptyDir.unshare -U truesucceeds from inside the pod;podman build --storage-driver=vfs→Successfully tagged …(podman 5.8.7);podman push --tls-verify=true→ storedsha256:3dcde6e0d00e74f52bebe41c3e81e6bdcd3e71c0fc6c186c139673ed52393b0e;The one arrangement the test needed: the context on a volume rather than on the container's own overlayfs, where buildah ≥ 1.34 fails before STEP 1 (containers/buildah#6910). §9n records it, because a context built inside a container needs the same care.
Item 3 — the field reaches the sandbox. The pod reached
Runningwithspec.hostUsers: false. That is exactly what failed before the sysctl: containerd could not create the sandbox at all —failed to start noop process for unshare: … no space left on devicewith 34 GB free on the node, which isuser.max_user_namespaces = 0and not a full disk.Not exercised: the credentialed push. The PoC pushed anonymously to
preview/poc:userns(preview/**is anonymously writable), which proves build + push + served bytes from a namespaced pod without a Vault read. Theannia-ci/ZOT_TOKENlogin belongs to annia-infra#310 and depends on milner#110: the secret extension has no rule for that repository yet, so a step asking forZOT_TOKENwould not even compile.preview/poc:usernsis a disposable tag under zot'spreview/**retention; deleting it early needs theannia-cicredential.Fallback
Not taken. If the build had failed, the plan's fallback was one named
privileged: truestep behind the same allowlist, with §15 saying the privilege is real and why. It was not needed, so no step in any pipeline is privileged andpolicy/k8s.regoneeded no exemption — which is the point of the user namespace.