Update Dockerfile
Browse files25 unmodified lines262728293031323334353625 unmodified linesprintf '#!/bin/sh\nexport IS_SANDBOX=1\nexport CLAUDE_CODE_BUBBLEWRAP=1\nexec "%s.real" "$@"\n' "$CLAUDE_BIN" > "$CLAUDE_BIN" && \chmod +x "$CLAUDE_BIN"# 2. 精准定位并 Patch cli.js,彻底移除 root uid 检测(使用 $(npm root -g) 确保 100% 找到路径)RUN CLI_PATH="$(npm root -g)/@anthropic-ai/claude-code/cli.js" && \sed -i 's/process\.getuid() === 0/false/g' "$CLI_PATH" && \sed -i 's/process\.getuid()==0/false/g' "$CLI_PATH"# 确保给 node 用户写入正确的 bypass 权限RUN mkdir -p /home/node/.claude && \echo '{"permissions":{"defaultMode":"bypassPermissions"},"skipDangerousModePermissionPrompt":true}' > /home/node/.claude/settings.json && \25 unmodified lines26272829303125 unmodified linesprintf '#!/bin/sh\nexport IS_SANDBOX=1\nexport CLAUDE_CODE_BUBBLEWRAP=1\nexec "%s.real" "$@"\n' "$CLAUDE_BIN" > "$CLAUDE_BIN" && \chmod +x "$CLAUDE_BIN"# 确保给 node 用户写入正确的 bypass 权限RUN mkdir -p /home/node/.claude && \echo '{"permissions":{"defaultMode":"bypassPermissions"},"skipDangerousModePermissionPrompt":true}' > /home/node/.claude/settings.json && \
Dockerfile-5