- Shell 28.1%
- Python 19.1%
- CSS 16.1%
- C# 13.5%
- HTML 10.6%
- Other 12.6%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| docs | ||
| template/dotnet-webapp-template | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| .repomixignore | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| forgejo-pr.sh | ||
| LICENSE | ||
| opencode.json.template | ||
| README.md | ||
| repomix.config.json | ||
coding-agent
A Docker image providing a sandboxed environment for opencode-ai.
Image structure
- Base:
ubuntu:24.04 - Runtime tooling: Node.js/npm, .NET 10.0 SDK (
/usr/local/dotnet),opencode-ai(npm global), Mistral Vibe CLI - Entrypoint:
entrypoint.sh— configures git from env vars, then execs the CMD - Default workdir:
/workspace
Usage
# Build
docker build -t coding-agent .
# Run interactively
docker run -it --rm \
-e GIT_USER_NAME="Your Name" \
-e GIT_USER_EMAIL="you@example.com" \
coding-agent
docker-compose
docker compose up -d
Once running, the web UI (ttyd) is available at http://localhost:7681 — but only if TTYD_USERNAME and TTYD_PASSWORD are set in your .env file. Without these, the container starts the default CMD (bash).
See .env.example for environment variable configuration.
Included tools
ttyd — Web terminal
ttyd provides a browser-accessible terminal at port 7681. When TTYD_USERNAME and TTYD_PASSWORD are set, the entrypoint starts ttyd with HTTP Basic Auth, giving you a full shell in the browser — no docker exec needed.
forgejo-pr
A script available inside the container at /usr/local/bin/forgejo-pr that creates pull requests via the Forgejo REST API. Auto-detects owner/repo from the git remote origin.
forgejo-pr --title "My PR" --head feature --base main
See forgejo-pr --help for full options. Connection details default from GIT_HOST/GIT_TOKEN environment variables.
Mistral Vibe CLI
Mistral Vibe CLI is installed. Run vibe --setup to configure it.
Environment variables
Git
| Variable | Default | Description |
|---|---|---|
GIT_USER_NAME |
— | Git user name |
GIT_USER_EMAIL |
— | Git user email |
GIT_TOKEN |
— | Git credential token (used with GIT_HOST) |
GIT_HOST |
— | Git host for credential storage (used with GIT_TOKEN) |
Web UI (ttyd)
| Variable | Default | Description |
|---|---|---|
TTYD_USERNAME |
admin |
Web UI username |
TTYD_PASSWORD |
— | Web UI password (enables ttyd web terminal when set) |
AI API keys
These env vars are available to all tools inside the container — opencode, aider, vibe, and any script or custom tool.
| Variable | Consumed by |
|---|---|
OPENROUTER_API_KEY |
opencode, aider, vibe (custom provider) |
MISTRAL_API_KEY |
opencode, aider, vibe (default provider) |
OPENAI_API_KEY |
opencode, aider, vibe (custom provider) |
ANTHROPIC_API_KEY |
opencode, aider, vibe (custom provider) |
GOOGLE_API_KEY |
opencode, aider (via --api-key), vibe (custom provider) |
OLLAMA_CLOUD_API_KEY |
opencode (custom openai-compatible provider) |
The entrypoint auto-generates ~/.config/opencode/opencode.json for any provider whose env var is set (skips if config already exists). See opencode.json.template for the full reference.
opencode.json Configuration
A template with all available settings is provided at opencode.json.template. For example, to set default models:
{
"$schema": "https://opencode.ai/config.json",
"model": "openrouter/poolside/laguna-m.1:free",
"small_model": "openrouter/poolside/laguna-xs.2:free",
"provider": { ... }
}
License
Apache 2.0 — see LICENSE.