Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -20,11 +20,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 20 |
RUN npm install -g @anthropic-ai/claude-code @cloudcli-ai/cloudcli task-master-ai pnpm \
|
| 21 |
&& npm cache clean --force
|
| 22 |
|
| 23 |
-
# 2.
|
| 24 |
-
RUN
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
# 3. 安装官方 Cursor CLI,并使用【软链接】暴露到全局 PATH(保持 index.js 相对路径不破坏)
|
| 29 |
RUN curl -fsSL https://cursor.com/install | bash && \
|
| 30 |
chmod -R 755 /root/.local && \
|
|
|
|
| 20 |
RUN npm install -g @anthropic-ai/claude-code @cloudcli-ai/cloudcli task-master-ai pnpm \
|
| 21 |
&& npm cache clean --force
|
| 22 |
|
| 23 |
+
# 2. 包装 claude 可执行文件,启动时无条件注入沙箱变量
|
| 24 |
+
RUN CLAUDE_BIN=$(which claude) && \
|
| 25 |
+
mv "$CLAUDE_BIN" "${CLAUDE_BIN}.real" && \
|
| 26 |
+
printf '#!/bin/sh\nexport IS_SANDBOX=1\nexport CLAUDE_CODE_BUBBLEWRAP=1\nexec "%s.real" "$@"\n' "$CLAUDE_BIN" > "$CLAUDE_BIN" && \
|
| 27 |
+
chmod +x "$CLAUDE_BIN"
|
| 28 |
+
|
| 29 |
# 3. 安装官方 Cursor CLI,并使用【软链接】暴露到全局 PATH(保持 index.js 相对路径不破坏)
|
| 30 |
RUN curl -fsSL https://cursor.com/install | bash && \
|
| 31 |
chmod -R 755 /root/.local && \
|