fix: docker/edge/dispatcher.sh: switch dynamic .claude mounts to shared CLAUDE_CONFIG_DIR (#643) #656
1 changed files with 15 additions and 11 deletions
|
|
@ -443,8 +443,9 @@ launch_runner() {
|
||||||
cmd+=(-v /usr/local/bin/claude:/usr/local/bin/claude:ro)
|
cmd+=(-v /usr/local/bin/claude:/usr/local/bin/claude:ro)
|
||||||
fi
|
fi
|
||||||
local runtime_home="${HOME:-/home/debian}"
|
local runtime_home="${HOME:-/home/debian}"
|
||||||
if [ -d "${runtime_home}/.claude" ]; then
|
if [ -d "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude:/home/agent/.claude")
|
cmd+=(-v "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}:${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}")
|
||||||
|
cmd+=(-e "CLAUDE_CONFIG_DIR=${CLAUDE_CONFIG_DIR:-/var/lib/disinto/claude-shared/config}")
|
||||||
fi
|
fi
|
||||||
if [ -f "${runtime_home}/.claude.json" ]; then
|
if [ -f "${runtime_home}/.claude.json" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
||||||
|
|
@ -626,10 +627,11 @@ dispatch_reproduce() {
|
||||||
cmd+=(-e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}")
|
cmd+=(-e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount ~/.claude and ~/.ssh from the runtime user's home if available
|
# Mount shared Claude config dir and ~/.ssh from the runtime user's home if available
|
||||||
local runtime_home="${HOME:-/home/debian}"
|
local runtime_home="${HOME:-/home/debian}"
|
||||||
if [ -d "${runtime_home}/.claude" ]; then
|
if [ -d "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude:/home/agent/.claude")
|
cmd+=(-v "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}:${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}")
|
||||||
|
cmd+=(-e "CLAUDE_CONFIG_DIR=${CLAUDE_CONFIG_DIR:-/var/lib/disinto/claude-shared/config}")
|
||||||
fi
|
fi
|
||||||
if [ -f "${runtime_home}/.claude.json" ]; then
|
if [ -f "${runtime_home}/.claude.json" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
||||||
|
|
@ -751,10 +753,11 @@ dispatch_triage() {
|
||||||
cmd+=(-e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}")
|
cmd+=(-e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount ~/.claude and ~/.ssh from the runtime user's home if available
|
# Mount shared Claude config dir and ~/.ssh from the runtime user's home if available
|
||||||
local runtime_home="${HOME:-/home/debian}"
|
local runtime_home="${HOME:-/home/debian}"
|
||||||
if [ -d "${runtime_home}/.claude" ]; then
|
if [ -d "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude:/home/agent/.claude")
|
cmd+=(-v "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}:${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}")
|
||||||
|
cmd+=(-e "CLAUDE_CONFIG_DIR=${CLAUDE_CONFIG_DIR:-/var/lib/disinto/claude-shared/config}")
|
||||||
fi
|
fi
|
||||||
if [ -f "${runtime_home}/.claude.json" ]; then
|
if [ -f "${runtime_home}/.claude.json" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
||||||
|
|
@ -952,10 +955,11 @@ dispatch_verify() {
|
||||||
cmd+=(-e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}")
|
cmd+=(-e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount ~/.claude and ~/.ssh from the runtime user's home if available
|
# Mount shared Claude config dir and ~/.ssh from the runtime user's home if available
|
||||||
local runtime_home="${HOME:-/home/debian}"
|
local runtime_home="${HOME:-/home/debian}"
|
||||||
if [ -d "${runtime_home}/.claude" ]; then
|
if [ -d "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude:/home/agent/.claude")
|
cmd+=(-v "${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}:${CLAUDE_SHARED_DIR:-/var/lib/disinto/claude-shared}")
|
||||||
|
cmd+=(-e "CLAUDE_CONFIG_DIR=${CLAUDE_CONFIG_DIR:-/var/lib/disinto/claude-shared/config}")
|
||||||
fi
|
fi
|
||||||
if [ -f "${runtime_home}/.claude.json" ]; then
|
if [ -f "${runtime_home}/.claude.json" ]; then
|
||||||
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
cmd+=(-v "${runtime_home}/.claude.json:/home/agent/.claude.json:ro")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue