Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a385a8a360 | ||
|
|
318e633419 | ||
| 5f5a0752ff | |||
|
|
d9bde195cd |
3 changed files with 36 additions and 2 deletions
|
|
@ -76,7 +76,23 @@ spec:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 &
|
# A reboot restarts this container inside the same pod, so the
|
||||||
|
# dind-run emptyDir keeps the previous daemon's pid file. dockerd
|
||||||
|
# then refuses to start ("process with PID N is still running")
|
||||||
|
# and the runner crashloops until the pod is deleted by hand.
|
||||||
|
# Clear the stale runtime state first so a restart is
|
||||||
|
# self-healing.
|
||||||
|
rm -f /var/run/docker.pid /var/run/docker.sock
|
||||||
|
# Forgejo's container registry is reached in-cluster as a plain
|
||||||
|
# HTTP ClusterIP (forgejo.forgejo.svc.cluster.local:3000).
|
||||||
|
# Docker only treats 127.0.0.0/8 as insecure by default, so
|
||||||
|
# without this a workflow that logs in to or pushes to that host
|
||||||
|
# dies with "server gave HTTP response to HTTPS client".
|
||||||
|
# The public hostname stays HTTPS via Cloudflare, which 413s
|
||||||
|
# layer uploads >~100MB, so in-cluster pushes are the reliable
|
||||||
|
# path for large images.
|
||||||
|
dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \
|
||||||
|
--insecure-registry=forgejo.forgejo.svc.cluster.local:3000 &
|
||||||
pid=$!
|
pid=$!
|
||||||
i=0
|
i=0
|
||||||
while [ "$i" -lt 30 ]; do
|
while [ "$i" -lt 30 ]; do
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,13 @@ spec:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
|
# A reboot restarts this container inside the same pod, so the
|
||||||
|
# dind-run emptyDir keeps the previous daemon's pid file. dockerd
|
||||||
|
# then refuses to start ("process with PID N is still running")
|
||||||
|
# and the runner crashloops until the pod is deleted by hand.
|
||||||
|
# Clear the stale runtime state first so a restart is
|
||||||
|
# self-healing.
|
||||||
|
rm -f /var/run/docker.pid /var/run/docker.sock
|
||||||
# --insecure-registry: the Pi registry is plain HTTP on the WG
|
# --insecure-registry: the Pi registry is plain HTTP on the WG
|
||||||
# hub IP. Docker only treats 127.0.0.0/8 as insecure by default,
|
# hub IP. Docker only treats 127.0.0.0/8 as insecure by default,
|
||||||
# so without this `docker push 10.10.0.1:5000/...` from a job
|
# so without this `docker push 10.10.0.1:5000/...` from a job
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,18 @@ data:
|
||||||
dir: /data/cache
|
dir: /data/cache
|
||||||
container:
|
container:
|
||||||
privileged: true
|
privileged: true
|
||||||
docker_host: "unix:///var/run/docker.sock"
|
# No docker_host: it injects the socket bind into the job container,
|
||||||
|
# which collides with the explicit -v /var/run/docker.sock in options
|
||||||
|
# ("Duplicate mount point"). The options bind is the deliberate choice.
|
||||||
|
#
|
||||||
|
# The job image is node:20-bullseye, which ships no docker CLI, so the
|
||||||
|
# socket alone is not enough — `docker login`/`build`/`push` die with
|
||||||
|
# "docker: command not found". The CLI and cli-plugins come from the
|
||||||
|
# dind sidecar's own filesystem (docker:27-dind ships /usr/local/bin/
|
||||||
|
# docker, docker-buildx, docker-compose), same as arm64.toml.
|
||||||
|
# No --memory cap: this runner also carries the existing amd64 release
|
||||||
|
# builds, which were already uncapped.
|
||||||
|
options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock
|
||||||
force_pull: true
|
force_pull: true
|
||||||
valid_volumes:
|
valid_volumes:
|
||||||
- "**"
|
- "**"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue