fix runner config: socket DinD, docker:27, sh shell

This commit is contained in:
stackops
2026-04-09 15:40:50 +03:00
parent 1e8bd10280
commit af6696279c
2 changed files with 132 additions and 17 deletions

View File

@@ -25,11 +25,12 @@ data:
capacity: 1
timeout: 1h
labels:
- "ubuntu-latest:docker://node:20-bookworm"
- "ubuntu-22.04:docker://node:20-bookworm"
- "ubuntu-latest:docker://docker:27"
- "ubuntu-22.04:docker://docker:27"
container:
network: ""
network: host
privileged: true
docker_host: unix:///var/run/docker.sock
options: ""
workdir_parent: /workspace
---
@@ -53,21 +54,18 @@ spec:
image: gitea/act_runner:latest
env:
- name: DOCKER_HOST
value: tcp://localhost:2376
- name: DOCKER_TLS_VERIFY
value: "1"
- name: DOCKER_CERT_PATH
value: /certs/client
value: unix:///var/run/docker.sock
command: ["sh", "-c"]
args:
- |
while ! nc -z localhost 2376; do sleep 1; done
apk add --no-cache docker-cli >/dev/null 2>&1
while ! docker info >/dev/null 2>&1; do sleep 1; done
act_runner register --no-interactive \
--instance http://gitea-http.gitea.svc.cluster.local:3000 \
--token "$(cat /secret/token)" \
--name k3s-runner \
--config /config/config.yaml \
--labels "ubuntu-latest:docker://node:20-bookworm,ubuntu-22.04:docker://node:20-bookworm"
--labels "ubuntu-latest:docker://docker:27,ubuntu-22.04:docker://docker:27"
act_runner daemon --config /config/config.yaml
volumeMounts:
- name: secret
@@ -76,9 +74,8 @@ spec:
- name: config
mountPath: /config
readOnly: true
- name: certs
mountPath: /certs
readOnly: true
- name: docker-sock
mountPath: /var/run
- name: data
mountPath: /data
resources:
@@ -94,10 +91,10 @@ spec:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
value: ""
volumeMounts:
- name: certs
mountPath: /certs
- name: docker-sock
mountPath: /var/run
- name: dind-storage
mountPath: /var/lib/docker
resources:
@@ -114,7 +111,7 @@ spec:
- name: config
configMap:
name: runner-config
- name: certs
- name: docker-sock
emptyDir: {}
- name: data
emptyDir: {}