mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
sandbox.sh utility to easily log into or execute commands in a sandbox, set hostname and SANDBOX env var to container name (#92)
This commit is contained in:
@@ -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=()
|
||||
|
||||
Reference in New Issue
Block a user