fix(web): make bun/bunx runnable by the host user in the dev image (BUNYIP-54) #68
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bunyip-54-web-bun-permission"
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?
Problem
The dev
webcontainer (dev-bunyip-${USER}) crash-looped: firstsh: 1: bun: Permission denied, thenbunx: command not found.In the pinned base image
ghcr.io/niceguyit/rust-builder-glibc:v1.0.0-rust1.94-trixie,/usr/local/bin/bunis a symlink into/root/.bun/bin/bunandbunxis absent. The container runs as the unprivileged host user (USER ${HOST_UID}:${HOST_GID}), which cannot traverse/root(mode 0700), so thebunexec fails; thepackage.jsoncss scripts also callbunx, which does not exist. Both are a regression of BUNYIP-37, despite the prior Dockerfile comment asserting the base image had been fixed.Verified:
docker run --user 1000:1000 <base> bun --version->bun: Permission denied(as root it prints1.3.13).Fix
In
bunyip-web/Dockerfile, while still root (before theUSERswitch), materialize the realbunbinary into a world-readable path outside/rootand recreatebunxas a symlink to it (bunrunsbun xwhen invoked as argv0bunx). Corrected the stale comment.Verification
Local
just dev-detach:dev-bunyip-web-${USER}isUp(no restart loop); logs showbuild:css"Done" andbunyip-web listening on 0.0.0.0:4400.GET /-> 200;GET /assets/styles.css-> 200 (52 KB, Tailwind built).bun --versionandbunx --versionboth report1.3.13as uid 1000 inside the container.Out of scope
Canonical fix belongs in the
niceguyit/rust-builderbase image (shipbunas a real 755 file + abunxsymlink). Flagged in BUNYIP-54 for a follow-up there.Refs BUNYIP-54.