Claude Code теперь работает внутри Docker-контейнера: - Видит ТОЛЬКО /data (рабочая папка сметчика) - Хостовая ФС недоступна (/home/mcp-user, .env, SSH ключи) - Лимиты: --memory=512m --cpus=1 - Auth через mount .claude/ (rw для session-env) - Образ: smeta-claude-sandbox (node:22-slim + python + openpyxl + claude-code) - Старый bridge сохранён как claude_bridge_direct.py Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
522 B
Docker
20 lines
522 B
Docker
FROM node:22-slim
|
|
|
|
# Python + libs for file processing
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip python3-venv && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip3 install --break-system-packages --no-cache-dir \
|
|
openpyxl python-docx pymupdf pandas
|
|
|
|
# Claude Code CLI
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
# Worker user with same UID as host mcp-user (for .claude auth files)
|
|
RUN useradd -m -s /bin/bash -u 1002 worker
|
|
USER worker
|
|
WORKDIR /data
|
|
|
|
ENTRYPOINT ["claude"]
|