forgejo-runner-amd64: run the runner as root so a raced dind socket chmod cannot crashloop it

This commit is contained in:
Lance Walters 2026-10-26 17:38:04 -04:00
commit 2eff85ba04

View file

@ -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