Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -20,9 +20,10 @@ 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 |
-
sed -i 's/
|
|
|
|
| 26 |
|
| 27 |
# 3. 安装官方 Cursor CLI,并使用【软链接】暴露到全局 PATH(保持 index.js 相对路径不破坏)
|
| 28 |
RUN curl -fsSL https://cursor.com/install | bash && \
|
|
|
|
| 20 |
RUN npm install -g @anthropic-ai/claude-code @cloudcli-ai/cloudcli task-master-ai pnpm \
|
| 21 |
&& npm cache clean --force
|
| 22 |
|
| 23 |
+
# 2. 精准定位 cli.js 并去除 root 权限退出逻辑
|
| 24 |
+
RUN CLI_PATH=$(node -e 'console.log(require("path").dirname(require.resolve("@anthropic-ai/claude-code/package.json")) + "/cli.js")') && \
|
| 25 |
+
sed -i 's/cannot be used with root\/sudo privileges for security reasons/bypass root/g' "$CLI_PATH" && \
|
| 26 |
+
sed -i 's/process\.exit(1)/ /* bypass */ /g' "$CLI_PATH"
|
| 27 |
|
| 28 |
# 3. 安装官方 Cursor CLI,并使用【软链接】暴露到全局 PATH(保持 index.js 相对路径不破坏)
|
| 29 |
RUN curl -fsSL https://cursor.com/install | bash && \
|