Smaller image: fewer kernel modules and files, unused services removed, oomd for jobs

- Kernel modules: all but hardware drivers, plus the VM and podman network drivers.
- Removed: System.map, the udev hwdb, and the homed/userdbd/nsresourced units.
- Job image: no translations (Locale=C.UTF-8).
- systemd-oomd kills the job container that runs the VM out of memory.
- gitea-runner waits for first-boot setup instead of restarting every 10s.
- Tighter comments in the sysctl config; Verify=no explained in the transfers.

/usr: 367 -> 307 MB, update download 317 -> 260 MB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V27snrGfdvwU7pMNBiDpHv
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-14 11:55:48 +01:00
1 parent 97355554f4
commit c2ec9ddb29
9 files changed
+64 -21

No files matched your search

+2 -2
View File
@@ -2,9 +2,9 @@
A [Gitea Actions](https://docs.gitea.com/usage/actions/overview) runner packaged as a minimal Fedora VM image, built with [mkosi](https://github.com/systemd/mkosi). It builds and publishes its own OS image, and keeps itself up to date.
- **Small:** Fedora with podman, networking and zram swap, for VMs only: no firmware or drivers for real hardware, no package manager or sshd.
- **Small:** Fedora with podman, networking and zram swap, for VMs only: no firmware or drivers for real hardware, no package manager or sshd. About 300 MB of RAM idle; boots in 512 MB.
- **Stateless:** container storage is wiped on every boot.
- **Isolated jobs:** each job runs in a container of its own (privileged, so it can build OS images), with its own podman; jobs never get the runner's podman. The job image ships with the OS, and common base images are shared read-only, so jobs don't download them.
- **Isolated jobs:** each job runs in a container of its own (privileged, so it can build OS images), with its own podman; jobs never get the runner's podman. The job image ships with the OS, and common base images are shared read-only, so jobs don't download them. A job that runs the VM out of memory is killed (systemd-oomd); the runner keeps running.
- **Self-updating:** images are rebuilt weekly and on every push. Hosts download updates with systemd-sysupdate into a second /usr partition (A/B) and reboot into them daily at about 04:10, after letting running jobs finish.
- **Read-only /usr:** systemd-boot starts a UKI that mounts /usr from a read-only erofs partition, checked by dm-verity. /etc and /var live on the root partition, which updates keep.
- **Hardened:** a firewall that drops all incoming traffic, and KSPP sysctls and kernel arguments.