fix(ci): run the container as the invoking user, not root #57
Reference in New Issue
Block a user
Delete Branch "fix/ci-run-file-ownership"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Docker on the dev boxes is rootful, so without
--userevery bytedocker/ci/runwrites into the bind-mounted repo is owned by root — and the user then needssudoto delete their own build artifacts.This is not hypothetical
export/in a working tree held 227 root-owned paths (149 MB) left by earlier runs.sylpheed.dbregen command in the workspaceCLAUDE.mdwrites straight into/work, so the analysis DB lands root-owned every time.sudo rm'd.Why it is not just adding
--userThe daemon creates a named volume root-owned, so a
--usercontainer cannot write/cargoor/targetat all — the build fails instantly. So the runner now takes ownership of both volumes first:Volume names become overridable (
SYLPH_CI_CARGO_VOL/SYLPH_CI_TARGET_VOL) — which is what let the chown path be tested against throwaway volumes instead of the real caches.Measured, not assumed
cargo check -p sylpheed-ppcthrough the runner/workfabi:fabi, removable withoutsudo✅On #53
The new block sits above the corpus-mount section that #53 rewrites, and
git merge-treeconfirms the two merge cleanly. Order of merge does not matter.