From 2eff85ba049993f0c80b2f0765716e6defacaf8f Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Mon, 26 Oct 2026 17:38:04 -0400 Subject: [PATCH] forgejo-runner-amd64: run the runner as root so a raced dind socket chmod cannot crashloop it --- apps/base/forgejo/runner-amd64.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/base/forgejo/runner-amd64.yaml b/apps/base/forgejo/runner-amd64.yaml index fbc6b01..44e9008 100644 --- a/apps/base/forgejo/runner-amd64.yaml +++ b/apps/base/forgejo/runner-amd64.yaml @@ -105,6 +105,14 @@ spec: - name: runner image: code.forgejo.org/forgejo/runner:5.0.1 imagePullPolicy: IfNotPresent + # The image runs as uid 1000. The dind socket is created 660 + # root:docker and the one-shot chmod 666 in the dind container can + # race a dockerd restart, after which the runner crashloops on + # "permission denied ... /var/run/docker.sock" (its wait loop only + # checks that the socket exists). Running the runner as root removes + # the dependency on that race; it is the uid the dind setup assumes. + securityContext: + runAsUser: 0 command: - sh - -c