amd64 runner: unix-socket dind only, no TCP 2375.
This commit is contained in:
parent
9a3ed8311f
commit
42509aacd9
2 changed files with 21 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue