Docker Sandbox template for OpenCode: uv, Vite, and herdr for FastAPI + React development.
63
Custom Docker Sandbox template for building FastAPI + React apps with the OpenCode coding agent.
Extends docker/sandbox-templates:opencode-docker, so the sandbox ships with the OpenCode agent, Git, a full Docker Engine (Docker-in-Docker), Node.js, and Python out of the box.
| Tool | Version | Purpose |
|---|---|---|
| uv | 0.12.10 (pinned) | FastAPI / Python dependency management |
| vite | latest (global npm) | React scaffolding (vite create) and dev server |
| herdr | 0.8.2 (pinned, checksummed) | Agent-driven terminal panes via CLI/socket API |
Pinned, SHA-256-verified installs make builds reproducible: the same Dockerfile always produces the same tool versions.
Requires the Docker Sandboxes CLI (sbx) and Docker Desktop.
$ sbx run --template docker.io/coderbd/sandbox-template-opencode:v1 opencode
sbx does not auto-resolve the docker.io domain — include it in the template reference.
Inside the sandbox the agent can scaffold and run the full stack:
$ uv init backend && cd backend && uv add fastapi # FastAPI
$ vite create frontend # React + Vite
$ herdr # manage panes for uvicorn + vite dev servers
Network policy
If your sandbox uses a restrictive network policy, allow-list the package registries:
$ sbx policy allow network "registry.npmjs.org:443,pypi.org:443,files.pythonhosted.org:443"
Source
Full documentation, version-bumping guide, and changelog live in the GitHub repository (https://github.com/coderbd/sandbox-template-opencode).
Content type
Image
Digest
sha256:6a3dac8b6…
Size
898.8 MB
Last updated
21 days ago
docker pull coderbd/sandbox-template-opencode:v1