feat: allow more dockerd options (#2701)

This commit is contained in:
Thorsten Wildberger
2023-07-25 06:59:49 +02:00
committed by GitHub
parent 06cbd632b8
commit dc58f6ba13
4 changed files with 51 additions and 1 deletions

View File

@@ -66,4 +66,47 @@ spec:
value: "172.17.0.0/12"
- name: DOCKER_DEFAULT_ADDRESS_POOL_SIZE
value: "24"
```
More options can be configured by mounting a configmap to the daemon.json location:
- rootless: /home/runner/.config/docker/daemon.json
- rootful: /etc/docker/daemon.json
```yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: example-runnerdeployment
spec:
template:
spec:
dockerdWithinRunnerContainer: true
image: summerwind/actions-runner-dind(-rootless)
volumeMounts:
- mountPath: /home/runner/.config/docker/daemon.json
name: daemon-config-volume
subPath: daemon.json
volumes:
- name: daemon-config-volume
configMap:
name: daemon-cm
items:
- key: daemon.json
path: daemon.json
securityContext:
fsGroup: 1001 # runner user id
```
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: daemon-cm
data:
daemon.json: |
{
"log-level": "warn",
"dns": ["x.x.x.x"]
}
```