Expand description
The warm caches runner containers share and keep between jobs: each profile’s read-only snapshot, each slot’s volume (its layers’ changes and its Docker Engine’s data), the shared pnpm store and Maven repository, and the Docker Hub mirror on the runners’ network. Owns their names, mounts and lifecycle; it never decides when a runner starts, and it never touches a volume a running container uses.
Structs§
- Emptied
- A shared cache
trim_sharedemptied. - Measure
- What a measure container (
image/seed.sh measure) runs on: the profile’s image, its slot 1 and the snapshot, both read-only, and the isolation backend. - Names
- The names of everything runnerd creates in Docker, under one prefix:
runnerd, or another for tests. - Refused
- A volume
trim_sharedwas to remove that Docker refused to. - Reseed
- What
reseedruns on: the profile’s image and limits, its slots and the isolation backend. - Trimmed
- What
trim_sharedmeasured and emptied.
Enums§
- Measured
- What a measure found: what a reseed would weigh against
caches.reseed_at. - Mirror
- Whether the mirror’s container is down, so its storage can be removed.
Constants§
- MIRROR_
IMAGE - The Docker Hub pull-through cache (
registry3.1.2, multi-platform index).
Functions§
- docker_
budget_ gib - One slot’s share of
diskamongslots, in whole GiB asimage/layers.shtakes it: at least 1, at mostDOCKER_SLOT_MAX_GIB. - docker_
disk - What the slots’ Docker Engines may keep together, in bytes: a quarter of Docker’s disk not otherwise used, which is what is free plus what the slot volumes already hold, measured together (docs/adr/0054).
- finish_
reseed - Waits for a seed or measure container to exit, removes it, and returns its output. Also takes over a seed
container an earlier daemon left running: stopping it between its
rmandmvwould lose that snapshot layer. - measure
- Measures what the profile’s slot 1 changed (
image/seed.sh measure), in a container that mounts slot 1’s volume and the snapshot read-only, so it may run while the profile’s runners do. A measure container an earlier daemon left is removed first. - measure_
spec - The container
measureruns:seed.sh measureon slot 1’s volume and the snapshot, both read-only. - mirror_
body - The mirror container: Docker Hub through a proxy registry, which refuses pushes, so a job can only make it fetch what Docker Hub serves. Content not pulled again within the TTL expires. No published port.
- mirror_
down - Stops the mirror; its storage stays.
- mirror_
up - Starts the mirror unless it runs.
- prepare
- Creates what a profile’s runner in
slot(1-based) mounts and joins, if missing. - reseed
- Makes slot 1’s layers the profile’s new snapshot and drops every slot’s own layer changes (
image/seed.sh), if slot 1 changed at leastmin_changes. A snapshot that would outgrowmax_sizestarts over from the image, as every slot’s changes go too (docs/adr/0065); after a reseed that did not finish, it starts over whatever the limits (docs/adr/0066). Call only while none of the profile’s slots runs. Returns the seed container’s output. - runner_
mounts - What a runner container in slot
slot(1-based) of the profile mounts (paths fromimage/Dockerfile). - seeded
- Whether the output of a reseed (
image/seed.sh) says it replaced the snapshot, and so dropped every slot’s own layer changes, rather than left them because slot 1 changed too little. - trim_
shared - Empties the shared caches that outgrew their limit, the mirror’s storage among them once the mirror is down
(
Mirror::Down), and removes the volumes of slots past the countslotsgives their profile, as a lowered count leaves them: each holds a slot’s layers and Docker store, which no job prunes again (docs/adr/0054). Call only while no runner runs, and leave out ofslotsa profile whose reseed runs, which mounts its slots’ volumes. - volumes
- Every cache volume the config’s profiles use, what it holds and its limit, with size 0.