-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathDockerfile.test
More file actions
43 lines (34 loc) · 1.2 KB
/
Copy pathDockerfile.test
File metadata and controls
43 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM ubuntu:24.04@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
python3-full \
git \
curl \
jq \
nodejs \
npm \
bubblewrap \
tmux \
ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Claude Code sandboxing needs the sandbox runtime on PATH (plus bwrap above);
# global npm install requires root, so it happens before the testuser drop.
RUN npm install -g @anthropic-ai/sandbox-runtime
RUN useradd -m -s /bin/bash testuser
# Install Claude Code (as testuser so it's accessible at runtime)
USER testuser
RUN curl -fsSL https://claude.ai/install.sh | bash
USER root
ENV PATH="/home/testuser/.local/bin:$PATH"
# Upgrade pip system-wide
RUN python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || true
USER testuser
RUN mkdir -p /home/testuser/Projects /home/testuser/.claude
WORKDIR /home/testuser/Projects
ENV HOME=/home/testuser
ENV PATH="/home/testuser/.local/bin:$PATH"
RUN echo 'export HOME=/home/testuser' >> /home/testuser/.bashrc && \
echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/testuser/.bashrc