diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-25 09:25:17 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-25 09:25:17 +0200 |
| commit | 2fd4fa399e980e3ea351df435d0f0eb2841679d8 (patch) | |
| tree | 4a9e36626d52efd231123a39859216060c072b05 /image-builder/README | |
| parent | 5fb8cef38353f27d40b89b62a60b1c48e1a1dd5f (diff) | |
| download | sbo-dockerbuild-2fd4fa399e980e3ea351df435d0f0eb2841679d8.tar.gz sbo-dockerbuild-2fd4fa399e980e3ea351df435d0f0eb2841679d8.zip | |
image-builder: document the XDG_RUNTIME_DIR dockerd trap
A dockerd restarted from a root login shell inherits
XDG_RUNTIME_DIR=/run/user/0. BuildKit's overlay differ creates its temp
dir there, and once elogind removes it at logout every image export
fails with a misleading "ref ... locked" error. This stalled the
-current full image for three nights. The fix on the VM is
`unset XDG_RUNTIME_DIR` in /etc/default/docker, which rc.docker sources.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'image-builder/README')
| -rw-r--r-- | image-builder/README | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/image-builder/README b/image-builder/README index 5910497..a1ea0c4 100644 --- a/image-builder/README +++ b/image-builder/README @@ -26,7 +26,19 @@ Two disks, and which is which matters: a system disk (80 GB, also holding the registry store) and a separate docker volume (160 GB) for images and build scratch. See fstab.example. -1. Install docker; enable the daemon. +1. Install docker; enable the daemon. Then add to /etc/default/docker + (rc.docker sources it before starting dockerd): + unset XDG_RUNTIME_DIR + + A dockerd restarted from a root login shell inherits + XDG_RUNTIME_DIR=/run/user/0, and BuildKit's overlay differ puts its temp + dir there. elogind removes that dir at logout, so every later image + export fails. dockerd logs "failed to create temp dir: stat /run/user/0: + no such file or directory", and the build prints a misleading + "failed to open writer: ref moby/1/... locked ... unavailable". Retrying + does not help; only a restart from a clean env does. This stalled the + -current full image from 2026-09-23 to 09-25. Check a running daemon with: + tr '\0' '\n' < /proc/$(pidof dockerd)/environ | grep XDG_RUNTIME_DIR 2. NFS-mount the two NAS trees read-only, named to match: /mnt/nas/slackware64-current -> -current mirror tree |
