A Docker image providing a sandboxed environment for ai coding agents.
  • Shell 31.3%
  • Python 30.3%
  • CSS 11.8%
  • C# 9.9%
  • HTML 7.7%
  • Other 9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
coding-agent 188b3d149b
All checks were successful
Build / build (push) Successful in 4s
Add ai review
2026-08-05 14:02:46 +00:00
.forgejo Add ai review 2026-08-05 14:02:46 +00:00
docs docs: add comprehensive code review findings 2026-06-19 07:21:49 +00:00
template/dotnet-webapp-template feat: add AI Code Review script and workflow for automated code reviews 2026-05-21 10:17:22 +02:00
.dockerignore feat: enhance Docker setup with multi-agent architecture and configuration scripts 2026-07-26 21:42:58 +02:00
.env.example feat: add PROMPTY_BASE_URL env var for prompty provider 2026-07-30 11:33:25 +00:00
.gitattributes Add .gitattributes file to manage line endings and text normalization 2026-05-18 22:09:27 +02:00
.gitignore feat: add DataStoring and DataStoring.Contract project files to dotnet webapp template 2026-05-21 08:36:51 +02:00
.repomixignore add repomix configuration 2026-05-20 11:59:22 +00:00
AGENTS.md Update AGENTS.md: add Hermes to all-agents image and fix duplicate Ownership header 2026-08-05 10:05:43 +00:00
docker-compose.yml fix: add PROMPTY_API_KEY and PROMPTY_BASE_URL to docker-compose env 2026-07-30 11:41:21 +00:00
Dockerfile feat: add provider switch for Claude Code (Anthropic/OpenRouter/OpenCode Go) 2026-07-28 21:51:36 +02:00
Dockerfile.aider feat: enhance Docker setup with multi-agent architecture and configuration scripts 2026-07-26 21:42:58 +02:00
Dockerfile.base feat: enhance Docker setup with multi-agent architecture and configuration scripts 2026-07-26 21:42:58 +02:00
Dockerfile.claude feat: add Claude Code support with OpenRouter routing 2026-07-28 18:52:55 +02:00
Dockerfile.hermes feat: enhance Docker setup with multi-agent architecture and configuration scripts 2026-07-26 21:42:58 +02:00
Dockerfile.opencode feat: enhance Docker setup with multi-agent architecture and configuration scripts 2026-07-26 21:42:58 +02:00
Dockerfile.vibe feat: enhance Docker setup with multi-agent architecture and configuration scripts 2026-07-26 21:42:58 +02:00
entrypoint.sh add Prompty model discovery via openai-compatible-models plugin 2026-07-30 11:56:05 +00:00
forgejo-pr.sh Refactor Dockerfile and forgejo-pr.sh script: update file paths, enhance logging, and improve error handling 2026-05-19 07:46:05 +02:00
LICENSE Initial commit 2026-05-18 19:29:06 +00:00
opencode.json.template add Prompty model discovery via openai-compatible-models plugin 2026-07-30 11:56:05 +00:00
README.md feat: add PROMPTY_BASE_URL env var for prompty provider 2026-07-30 11:33:25 +00:00
repomix.config.json add repomix configuration 2026-05-20 11:59:22 +00:00

coding-agent

A Docker image providing a sandboxed environment for AI coding agents. Supports opencode-ai, aider, Mistral Vibe CLI, Hermes Agent, and Claude Code — either all-in-one or as isolated single-agent images.

Image architecture

The project is split into a shared base image plus per-agent images:

Dockerfile Image Contents
Dockerfile.base coding-agent-base Ubuntu 24.04 + git, curl, jq, ttyd, SSH, Node.js 22, .NET 10 SDK, repomix, forgejo-pr
Dockerfile coding-agent All agents (opencode + aider + vibe + hermes + claude)
Dockerfile.opencode coding-agent-opencode opencode-ai only
Dockerfile.aider coding-agent-aider aider-chat only
Dockerfile.vibe coding-agent-vibe Mistral Vibe CLI only
Dockerfile.hermes coding-agent-hermes Hermes Agent (Nous Research) only
Dockerfile.claude coding-agent-claude Claude Code only

Each agent Dockerfile is self-contained (builds from ubuntu:24.04), so you can build any image independently:

docker build -t coding-agent -f Dockerfile .
docker build -t coding-agent-opencode -f Dockerfile.opencode .
docker build -t coding-agent-aider -f Dockerfile.aider .
docker build -t coding-agent-vibe -f Dockerfile.vibe .
docker build -t coding-agent-hermes -f Dockerfile.hermes .
docker build -t coding-agent-claude -f Dockerfile.claude .

Dockerfile.base is optional — use it if you want to pre-build and cache the common layers:

docker build -t coding-agent-base -f Dockerfile.base .
docker build -t coding-agent-opencode -f Dockerfile.opencode .

With docker-compose this is handled automatically.

docker-compose — multi-service with profiles

Each agent runs as a separate service with isolated ports and volumes:

Service Profile ttyd port SSH port Workspace
coding-agent (default) 7681 2222 ./data/workspace
opencode opencode 7682 2223 ./data/workspace-opencode
aider aider 7683 2224 ./data/workspace-aider
vibe vibe 7684 2225 ./data/workspace-vibe
hermes hermes 7685 2226 ./data/workspace-hermes
claude claude 7686 2227 ./data/workspace-claude

Run a single agent

# Build all images
docker compose build

# Start only opencode
docker compose --profile opencode up -d

# Start only aider
docker compose --profile aider up -d

# Start only vibe
docker compose --profile vibe up -d

# Start only hermes
docker compose --profile hermes up -d

# Start only claude
docker compose --profile claude up -d

# Start multiple agents simultaneously
docker compose --profile opencode --profile aider up -d

Run the all-in-one (default)

docker compose up -d

Build the base image only

docker compose --profile base build

Usage

Build

docker build -t coding-agent -f Dockerfile .

Run interactively

docker run -it --rm \
  -e GIT_USER_NAME="Your Name" \
  -e GIT_USER_EMAIL="[email protected]" \
  coding-agent

Web UI (ttyd)

When TTYD_USERNAME and TTYD_PASSWORD are set, a browser-accessible terminal is available at http://localhost:<port>.

SSH (JetBrains Gateway / remote development)

ssh root@localhost -p <ssh-port>

Set SSH_PUBLIC_KEYS in your .env to enable key-based login.

forgejo-pr

forgejo-pr --title "My PR" --head feature --base main

Environment variables

Git

Variable Default Description
GIT_USER_NAME Git user name
GIT_USER_EMAIL Git user email
GIT_TOKEN Git credential token (single-host, legacy)
GIT_HOST Git host for credential storage (single-host, legacy)
GIT_CREDENTIALS Comma-separated host:token pairs (multi-host)

GIT_CREDENTIALS takes precedence over GIT_TOKEN+GIT_HOST.

Web UI (ttyd)

Variable Default Description
TTYD_USERNAME admin Web UI username
TTYD_PASSWORD Web UI password (enables ttyd when set)

SSH

Variable Default Description
SSH_PUBLIC_KEYS Public key(s) for SSH login as root. Multiple keys separated by newlines or commas.

AI API keys

Available to all tools inside the container.

Variable Consumed by
OPENROUTER_API_KEY opencode, aider, vibe, claude
MISTRAL_API_KEY opencode, aider, vibe
OPENAI_API_KEY opencode, aider, vibe
ANTHROPIC_API_KEY opencode, aider, vibe, claude
GOOGLE_API_KEY opencode, aider, vibe
OPENCODE_API_KEY opencode, claude
OLLAMA_CLOUD_API_KEY opencode
PROMPTY_API_KEY opencode
PROMPTY_BASE_URL opencode (default: http://localhost:8080/v1)

Claude Code routing

Claude Code supports multiple providers. The entrypoint auto-configures the provider based on CLAUDE_PROVIDER or the available API keys (priority: Anthropic > OpenRouter > OpenCode Go):

Provider Required env vars Auto-configured vars
Anthropic (direct) ANTHROPIC_API_KEY none
OpenRouter OPENROUTER_API_KEY (no ANTHROPIC_API_KEY) ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN
OpenCode Go OPENCODE_API_KEY (no ANTHROPIC_API_KEY, no OPENROUTER_API_KEY) ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN
Variable Description
CLAUDE_PROVIDER Explicit provider selection: openrouter or opencode-go. Overrides auto-detection.
ANTHROPIC_BASE_URL Override API base URL (auto-set based on provider)
ANTHROPIC_AUTH_TOKEN Auth token for the API (used for OpenRouter)
ANTHROPIC_MODEL Override the model used by Claude Code (optional, for non-Claude models)

Note

: For maximum compatibility with Claude Code via OpenRouter, use "Anthropic 1P" as the preferred provider in your OpenRouter settings. Non-Claude models may not support all features (e.g., Extended Thinking, tool use).

OpenCode Go: Supports Anthropic-compatible models like Qwen3.7 Plus, Qwen3.7 Max, MiniMax M3. Set ANTHROPIC_MODEL to the model ID (e.g., qwen3.7-plus).

The entrypoint auto-generates ~/.config/opencode/opencode.json for any provider whose env var is set (only when opencode is installed).

License

Apache 2.0 — see LICENSE.