Spaces:
Paused
Paused
| FROM ubuntu:22.04 | |
| # Install basic dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| curl git sudo python3 python3-pip nano \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Node.js (Claude Code requires Node 18+) | |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y nodejs | |
| # Install Claude Code globally | |
| RUN npm install -g @anthropic-ai/claude-code | |
| # Install code-server (VS Code for the browser) | |
| RUN curl -fsSL https://code-server.dev/install.sh | sh | |
| # Setup user workspace (Hugging Face requires user ID 1000) | |
| RUN useradd -m -u 1000 coder \ | |
| && mkdir -p /home/coder/workspace \ | |
| && chown -R coder:coder /home/coder | |
| RUN echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
| USER coder | |
| WORKDIR /home/coder/workspace | |
| # Bypass the Claude Code login screen during the image build | |
| RUN echo '{"hasCompletedOnboarding": true}' > /home/coder/.claude.json | |
| # Expose Hugging Face's default port | |
| EXPOSE 7860 | |
| # Start VS Code Web IDE on port 7860 (NOTICE THE SPACE AFTER CMD) | |
| CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "password", "/home/coder/workspace"] | |