docs: explain labels, the docker image cache volume, and the dind-rootless UID (#1086)

Fixes #106
Fixes #570
Fixes #627

Reviewed-on: https://gitea.com/gitea/runner/pulls/1086
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
bircni
2026-07-15 06:34:32 +00:00
parent 7e7e3ef1a6
commit d6882b3df5
5 changed files with 117 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# Holds the runner's working directory (/data): the .runner registration file
# and, optionally, the config file.
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
@@ -10,6 +12,21 @@ spec:
storage: 1Gi
storageClassName: standard
---
# Holds the Docker daemon's data root (/var/lib/docker), i.e. the images pulled
# for jobs. Without it, the image cache is lost whenever the pod is recreated
# and every job re-pulls its images. Size it for the images you expect to cache.
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: docker-vol
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: standard
---
apiVersion: v1
data:
# The registration token can be obtained from the web UI, API or command-line.
@@ -45,6 +62,9 @@ spec:
- name: runner-data
persistentVolumeClaim:
claimName: runner-vol
- name: docker-data
persistentVolumeClaim:
claimName: docker-vol
initContainers:
- name: docker
image: docker:28.2.2-dind
@@ -53,6 +73,8 @@ spec:
volumeMounts:
- name: docker-socket
mountPath: /var/run
- name: docker-data
mountPath: /var/lib/docker
startupProbe:
exec:
command: ["/usr/bin/test", "-S", "/var/run/docker.sock"]