diff options
| author | Olcan <[email protected]> | 2025-04-21 14:43:43 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-21 14:43:43 -0700 |
| commit | 319f211211432409abba06caf55e40ef200eab85 (patch) | |
| tree | 0e9693b890930434ea69785eecdfd461be67a6e4 /scripts/start_sandbox.sh | |
| parent | 7663ccf0bdd31f4da920d8148d5286b6b535b501 (diff) | |
improved (full color) sandbox, mount /tmp to display build warnings, display sandbox name in footer (#96)
Diffstat (limited to 'scripts/start_sandbox.sh')
| -rwxr-xr-x | scripts/start_sandbox.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/start_sandbox.sh b/scripts/start_sandbox.sh index 04f3a55f..9a79319b 100755 --- a/scripts/start_sandbox.sh +++ b/scripts/start_sandbox.sh @@ -36,6 +36,9 @@ run_args=(-it --rm) # mount current directory as $WORKDIR inside container run_args+=(-v "$PWD:$WORKDIR") +# mount $TMPDIR as /tmp inside container +run_args+=(-v "$TMPDIR:/tmp") + # name container after image, plus numeric suffix to avoid conflicts INDEX=0 while $CMD ps -a --format "{{.Names}}" | grep -q "$IMAGE-$INDEX"; do @@ -46,6 +49,9 @@ run_args+=(--name "$IMAGE-$INDEX" --hostname "$IMAGE-$INDEX") # also set SANDBOX environment variable as container name run_args+=(--env "SANDBOX=$IMAGE-$INDEX") +# pass TERM and COLORTERM to container to maintain terminal colors +run_args+=(--env "TERM=$TERM" --env "COLORTERM=$COLORTERM") + # enable debugging via node --inspect-brk (and $DEBUG_PORT) if DEBUG is set node_args=() if [ -n "${DEBUG:-}" ]; then |
