Entorno de desarrollo sandboxed con Claude Code · Python 3.12 + Node 22 + pnpm
{ "name": "DataPulse Analytics", "build": { "dockerfile": "Dockerfile" }, "features": { "ghcr.io/devcontainers/features/github-cli:1" }, "runArgs": [ "--cap-add=NET_ADMIN", "--cap-add=NET_RAW" ], "postCreateCommand": "rm -rf .venv && uv sync && uv run /opt/post_install.py && pnpm install --frozen-lockfile", "remoteEnv": { "ANTHROPIC_API_KEY": "${localEnv:ANTHROPIC_API_KEY:}", "CLAUDE_CODE_OAUTH_TOKEN": "${localEnv:CLAUDE_CODE_OAUTH_TOKEN:}" } }
| Volumen | Target | Tipo |
|---|---|---|
| datapulse-analytics-bashhistory-* | /commandhistory | volume |
| datapulse-analytics-config-* | /home/vscode/.claude | volume |
| datapulse-analytics-gh-* | /home/vscode/.config/gh | volume |
| $HOME/.gitconfig | /home/vscode/.gitconfig | bind |
| .devcontainer/ | /workspace/.devcontainer | bind ro |
1. rm -rf .venv # Limpia venv previo 2. uv sync # Instala deps Python 3.12 # FastAPI, pandas, scikit-learn... 3. uv run /opt/post_install.py # Bypass onboarding Claude Code # Config tmux 200k history # Permisos volúmenes 4. pnpm install --frozen-lockfile # Instala Next.js 14 + deps TS # Lockfile: pnpm-lock.yaml
ANTHROPIC_API_KEY antes de lanzar. Claude Code lo recoge automaticamente via remoteEnv.
# Multi-stage: uv binario sin overhead FROM ghcr.io/astral-sh/uv:0.10 AS uv FROM mcr.microsoft.com/devcontainers/base:ubuntu24.04 # Sandboxing Claude Code RUN apt-get install -y bubblewrap socat \ ripgrep fd-find fzf tmux \ ipset iptables iproute2 # Python 3.12 (pyproject.toml requiere 3.12) RUN uv python install 3.12 --default # Node 22 via fnm + pnpm 9 RUN fnm install 22 && fnm default 22 RUN npm install -g pnpm@9 # Claude Code + marketplace plugins RUN curl -fsSL https://claude.ai/install.sh | bash \ && claude plugin marketplace add anthropics/skills \ && claude plugin marketplace add trailofbits/skills