From 42509aacd92883035bf924f58372603785e670f7 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Fri, 11 Sep 2026 22:37:09 -0400 Subject: [PATCH] amd64 runner: unix-socket dind only, no TCP 2375. --- apps/base/forgejo/runner-amd64.yaml | 29 +++++++++++++++++-------- apps/base/forgejo/runner-configmap.yaml | 2 +- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/apps/base/forgejo/runner-amd64.yaml b/apps/base/forgejo/runner-amd64.yaml index 9cdbbef..b6384af 100644 --- a/apps/base/forgejo/runner-amd64.yaml +++ b/apps/base/forgejo/runner-amd64.yaml @@ -72,13 +72,22 @@ spec: - name: dind image: docker:27-dind imagePullPolicy: IfNotPresent - args: - - --host=tcp://127.0.0.1:2375 - - --host=unix:///var/run/docker.sock - - --tls=false - env: - - name: DOCKER_TLS_CERTDIR - value: "" + command: + - sh + - -c + - | + dockerd --host=unix:///var/run/docker.sock --tls=false & + pid=$! + i=0 + while [ "$i" -lt 30 ]; do + if [ -S /var/run/docker.sock ]; then + chmod 666 /var/run/docker.sock + break + fi + i=$((i+1)) + sleep 1 + done + wait "$pid" securityContext: privileged: true volumeMounts: @@ -103,7 +112,7 @@ spec: set -e i=0 while [ "$i" -lt 60 ]; do - if wget -qO- http://127.0.0.1:2375/_ping >/dev/null 2>&1; then + if [ -S /var/run/docker.sock ]; then break fi i=$((i+1)) @@ -112,13 +121,15 @@ spec: exec forgejo-runner --config /config/config.toml daemon env: - name: DOCKER_HOST - value: tcp://127.0.0.1:2375 + value: unix:///var/run/docker.sock volumeMounts: - name: config-toml mountPath: /config/config.toml subPath: amd64.toml - name: data mountPath: /data + - name: dind-run + mountPath: /var/run resources: requests: cpu: 50m diff --git a/apps/base/forgejo/runner-configmap.yaml b/apps/base/forgejo/runner-configmap.yaml index 7297164..a6311d9 100644 --- a/apps/base/forgejo/runner-configmap.yaml +++ b/apps/base/forgejo/runner-configmap.yaml @@ -34,6 +34,6 @@ data: dir: /data/cache container: privileged: true - docker_host: "tcp://127.0.0.1:2375" + docker_host: "unix:///var/run/docker.sock" valid_volumes: - "**"