diff options
| author | Olcan <[email protected]> | 2025-04-21 13:52:51 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-21 13:52:51 -0700 |
| commit | 09973956ae124b179d79bf8fe2056f127702b5ba (patch) | |
| tree | 2f3569fd55f66514765b310589ef76a984fcc2a1 /scripts/start_sandbox.sh | |
| parent | ddaa21c750dd47a5e9cd488375b249ac3a72a9d5 (diff) | |
sandbox.sh utility to easily log into or execute commands in a sandbox, set hostname and SANDBOX env var to container name (#92)
Diffstat (limited to 'scripts/start_sandbox.sh')
| -rwxr-xr-x | scripts/start_sandbox.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/start_sandbox.sh b/scripts/start_sandbox.sh index efa8ecc2..04f3a55f 100755 --- a/scripts/start_sandbox.sh +++ b/scripts/start_sandbox.sh @@ -41,7 +41,10 @@ INDEX=0 while $CMD ps -a --format "{{.Names}}" | grep -q "$IMAGE-$INDEX"; do INDEX=$((INDEX + 1)) done -run_args+=(--name "$IMAGE-$INDEX") +run_args+=(--name "$IMAGE-$INDEX" --hostname "$IMAGE-$INDEX") + +# also set SANDBOX environment variable as container name +run_args+=(--env "SANDBOX=$IMAGE-$INDEX") # enable debugging via node --inspect-brk (and $DEBUG_PORT) if DEBUG is set node_args=() |
