fix(docker): drop /var/run symlink from chisel rootfs for Kaniko
All checks were successful
Build & Publish / Check (push) Successful in 2m25s
Build & Publish / Build & Publish (push) Successful in 5m33s

The runtime stage copies the chisel rootfs onto `/` in a scratch stage.
chisel ships /var/run as a symlink to /run; Kaniko replacing it forces a
RemoveAll of the destination /var/run, which on the Forgejo act runner
holds a busy /var/run/act bind-mount -> 'unlinkat ... device or resource
busy'. The image does not need /var/run, so remove the symlink.
This commit is contained in:
Niels Göttsch 2026-07-17 10:40:05 +02:00
parent 3aa1abe175
commit 964b0be064

View file

@ -62,6 +62,14 @@ RUN useradd --root /rootfs -u 1000 -U -M -s /bin/false brewlog \
&& mkdir -p /rootfs/home/brewlog /rootfs/data \ && mkdir -p /rootfs/home/brewlog /rootfs/data \
&& chown 1000:1000 /rootfs/home/brewlog /rootfs/data && chown 1000:1000 /rootfs/home/brewlog /rootfs/data
# chisel's base-files ships /var/run as a symlink to /run. When the CI builder
# (Kaniko) lays this rootfs onto `/` for the scratch stage, replacing that
# symlink forces a RemoveAll of the destination /var/run — which on the Forgejo
# act runner is a directory holding a busy /var/run/act bind-mount, so the copy
# fails with "unlinkat /var/run/act: device or resource busy". The runtime image
# does not need /var/run, so drop the symlink to avoid the collision.
RUN rm -rf /rootfs/var/run
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Runtime — scratch with chisel rootfs # Runtime — scratch with chisel rootfs
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------