mirror of https://github.com/garrytan/gstack.git
fix: chmod 1777 /tmp in Docker image + runtime fallback
Bun's tempdir AccessDenied persists because the container /tmp is root-owned. Fix at both layers: 1. Dockerfile: chmod 1777 /tmp during build 2. Workflow: chmod + TMPDIR/BUN_TMPDIR fallback at runtime Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6f84028a8d
commit
817817e0db
|
|
@ -58,4 +58,4 @@ RUN mv /workspace/node_modules /opt/node_modules_cache \
|
||||||
RUN useradd -m -s /bin/bash runner \
|
RUN useradd -m -s /bin/bash runner \
|
||||||
&& chmod -R a+rX /opt/node_modules_cache \
|
&& chmod -R a+rX /opt/node_modules_cache \
|
||||||
&& mkdir -p /home/runner/.gstack && chown -R runner:runner /home/runner/.gstack \
|
&& mkdir -p /home/runner/.gstack && chown -R runner:runner /home/runner/.gstack \
|
||||||
&& mkdir -p /tmp/bun-cache && chmod 1777 /tmp/bun-cache
|
&& chmod 1777 /tmp
|
||||||
|
|
|
||||||
|
|
@ -98,10 +98,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Bun needs a writable tmpdir — GH Actions container user may not own the default
|
# Bun needs a writable tmpdir — GH Actions container user may not own the default.
|
||||||
|
# Force /tmp writable for all users (container default may be root-only).
|
||||||
- name: Fix temp dirs
|
- name: Fix temp dirs
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "$HOME/tmp"
|
chmod 1777 /tmp 2>/dev/null || sudo chmod 1777 /tmp 2>/dev/null || true
|
||||||
|
mkdir -p "$HOME/tmp" && chmod 1777 "$HOME/tmp"
|
||||||
echo "TMPDIR=$HOME/tmp" >> "$GITHUB_ENV"
|
echo "TMPDIR=$HOME/tmp" >> "$GITHUB_ENV"
|
||||||
echo "BUN_TMPDIR=$HOME/tmp" >> "$GITHUB_ENV"
|
echo "BUN_TMPDIR=$HOME/tmp" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue