Enables herdctl to run Claude Code agents inside a Docker container
715
This Docker image provides a containerized runtime environment for herdctl agents. It enables secure, isolated execution of Claude Code agents with full access to development tools.
@anthropic-ai/claude-code) - Official Anthropic CLI for Claude@anthropic-ai/claude-agent-sdk) - SDK for building Claude agentsgh) - For GitHub API operationsThe image includes an entrypoint that automatically configures Git to use the GITHUB_TOKEN environment variable for HTTPS authentication:
docker run -e GITHUB_TOKEN=your_token herdctl/runtime:latest
This allows agents to perform Git operations (clone, fetch, push) without manual authentication setup.
--user flag)no-new-privileges:true)CapDrop: ALL)/workspace (where your code is mounted)/home/claude/.claude/projects/This image is automatically used by herdctl when you enable Docker runtime in your agent configuration:
# herdctl-agent.yaml
name: my-agent
docker:
enabled: true
env:
GITHUB_TOKEN: "${GITHUB_TOKEN}"
herdctl handles:
docker execWhile this image is designed for herdctl, you can use it directly:
# Start a persistent container
docker run -d --name claude-agent \
-v /path/to/workspace:/workspace \
-e ANTHROPIC_API_KEY=your_key \
-e GITHUB_TOKEN=your_token \
--user 1000:1000 \
herdctl/runtime:latest
# Execute Claude CLI
docker exec claude-agent claude "analyze the code in this repo"
# Execute commands as needed
docker exec claude-agent git status
docker exec claude-agent gh api user
ANTHROPIC_API_KEY - Required for Claude API accessCLAUDE_CODE_OAUTH_TOKEN - Optional, for Claude Max web authenticationGITHUB_TOKEN - Optional, enables automatic Git HTTPS authenticationHOME - Set to /home/claude for CLI configurationThe container uses tail -f /dev/null as its main process to stay running. Commands are executed via docker exec. This approach allows:
git clone https://github.com/edspencer/herdctl.git
cd herdctl
docker build -t herdctl/runtime:latest -f Dockerfile .
MIT - See LICENSE in the GitHub repository.
Content type
Image
Digest
sha256:47b52c078…
Size
264.4 MB
Last updated
8 months ago
docker pull herdctl/runtime