-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 1.45 KB
/
Dockerfile
File metadata and controls
42 lines (34 loc) · 1.45 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
# toban/agent - Official Toban Agent Docker Image
# Pre-installs Claude Code CLI and other agent tools
# Agents run inside this container with filesystem isolation
FROM node:20-slim
# Install system dependencies + GitHub CLI
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
ca-certificates \
gpg \
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& apt-get update && apt-get install -y --no-install-recommends gh \
&& apt-get purge -y gpg && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Install coding agent CLIs globally
RUN npm install -g @anthropic-ai/claude-code \
&& npm install -g @google/gemini-cli \
&& npm install -g @openai/codex \
&& npm cache clean --force
# Create non-root user for agent execution
RUN useradd -m -s /bin/bash agent
# Set up workspace directories
RUN mkdir -p /workspace /workspace-agent && chown agent:agent /workspace /workspace-agent
# Add entrypoint script for worktree isolation
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Switch to non-root user
USER agent
WORKDIR /workspace
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bash"]