Create Dockerfile
Browse files- Dockerfile +33 -0
Dockerfile
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
|
| 3 |
+
# Install basic dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
curl git sudo python3 python3-pip nano \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Install Node.js (Claude Code requires Node 18+)
|
| 9 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
| 10 |
+
&& apt-get install -y nodejs
|
| 11 |
+
|
| 12 |
+
# Install Claude Code globally
|
| 13 |
+
RUN npm install -g @anthropic-ai/claude-code
|
| 14 |
+
|
| 15 |
+
# Install code-server (VS Code for the browser)
|
| 16 |
+
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 17 |
+
|
| 18 |
+
# Setup user workspace (Hugging Face requires user ID 1000)
|
| 19 |
+
RUN useradd -m -u 1000 coder \
|
| 20 |
+
&& mkdir -p /home/coder/workspace \
|
| 21 |
+
&& chown -R coder:coder /home/coder
|
| 22 |
+
|
| 23 |
+
USER coder
|
| 24 |
+
WORKDIR /home/coder/workspace
|
| 25 |
+
|
| 26 |
+
# Bypass the Claude Code login screen during the image build
|
| 27 |
+
RUN echo '{"hasCompletedOnboarding": true}' > /home/coder/.claude.json
|
| 28 |
+
|
| 29 |
+
# Expose Hugging Face's default port
|
| 30 |
+
EXPOSE 7860
|
| 31 |
+
|
| 32 |
+
# Start VS Code Web IDE on port 7860
|
| 33 |
+
CMD["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "/home/coder/workspace"]
|