From 072b97470e92d68f99cf912657ab8cd8fd8ea0e4 Mon Sep 17 00:00:00 2001 From: Daan Selen Date: Fri, 22 Aug 2025 20:22:55 +0000 Subject: [PATCH] chore(chart): add check to start once docker is available (#35) Should fix: - https://gitea.com/gitea/helm-actions/issues/31 - https://gitea.com/gitea/helm-actions/issues/27 Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/35 Reviewed-by: ChristopherHX Co-authored-by: Daan Selen Co-committed-by: Daan Selen --- templates/statefulset.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index 973ef06..0c9868a 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -48,6 +48,20 @@ spec: image: "{{ .Values.statefulset.actRunner.repository }}:{{ .Values.statefulset.actRunner.tag }}" imagePullPolicy: {{ .Values.statefulset.actRunner.pullPolicy }} workingDir: /data + command: + # The following is a workaround for: https://gitea.com/gitea/act_runner/issues/731 + # We must add the docker-cli package for the server AND client cert verification. + - sh + - -c + - | + apk add --no-cache docker-cli + echo "Waiting for Docker daemon..." + until timeout 10 docker info > /dev/null; do + echo "Failed, retrying..." + sleep 2 + done + echo "Docker is ready, starting act-runner..." + exec run.sh env: - name: DOCKER_HOST value: tcp://127.0.0.1:2376