mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 13:15:24 +02:00
fix: use Dockerfile USER directive + writable .bun dir
The --user runner container option doesn't set up the user environment properly — bun can't write temp files even with TMPDIR overrides. Switch to USER runner in the Dockerfile which properly sets HOME and creates the user context. Also pre-create ~/.bun owned by runner. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,4 +58,8 @@ RUN mv /workspace/node_modules /opt/node_modules_cache \
|
||||
RUN useradd -m -s /bin/bash runner \
|
||||
&& chmod -R a+rX /opt/node_modules_cache \
|
||||
&& mkdir -p /home/runner/.gstack && chown -R runner:runner /home/runner/.gstack \
|
||||
&& chmod 1777 /tmp
|
||||
&& chmod 1777 /tmp \
|
||||
&& mkdir -p /home/runner/.bun && chown -R runner:runner /home/runner/.bun
|
||||
|
||||
# Switch to runner user — bun needs HOME-writable for temp files
|
||||
USER runner
|
||||
|
||||
Reference in New Issue
Block a user