{"id":51423943,"url":"https://github.com/dashaun/docker-model-runner-sandbox-claude","last_synced_at":"2026-07-05T01:30:36.418Z","repository":{"id":341512598,"uuid":"1170136860","full_name":"dashaun/docker-model-runner-sandbox-claude","owner":"dashaun","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-02T04:55:53.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-02T09:25:54.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashaun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T18:52:45.000Z","updated_at":"2026-03-02T04:55:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dashaun/docker-model-runner-sandbox-claude","commit_stats":null,"previous_names":["dashaun/docker-model-runner-sandbox-claude"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dashaun/docker-model-runner-sandbox-claude","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashaun%2Fdocker-model-runner-sandbox-claude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashaun%2Fdocker-model-runner-sandbox-claude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashaun%2Fdocker-model-runner-sandbox-claude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashaun%2Fdocker-model-runner-sandbox-claude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashaun","download_url":"https://codeload.github.com/dashaun/docker-model-runner-sandbox-claude/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashaun%2Fdocker-model-runner-sandbox-claude/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35141083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-05T01:30:35.805Z","updated_at":"2026-07-05T01:30:36.388Z","avatar_url":"https://github.com/dashaun.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Model Runner Sandbox for Claude Code\n\nA Docker sandbox template that runs [Claude Code](https://claude.ai/code) powered by local AI models via [Docker Model Runner](https://docs.docker.com/desktop/features/model-runner/). No cloud API keys required.\n\nDocker Model Runner (Docker Desktop 4.40.0+) natively supports the Anthropic Messages API, so Claude Code connects directly with no translation layer.\n\n## Prerequisites\n\n- **Docker Desktop \u003e= 4.40.0** with Model Runner enabled\n  - Settings \u003e Features in development \u003e Enable Docker Model Runner\n- A pulled model:\n  ```bash\n  docker model pull ai/qwen3-coder-next\n  ```\n\n## Quick Start\n\n```bash\n# One-time per machine — pulls the image and configures the sandbox proxy\ndocker run --rm -v ~/.sandboxd:/sandboxd dashaun/dmr-claude-sandbox setup-host\n```\n\nThen from any directory:\n\n```bash\ndocker sandbox run -t dashaun/dmr-claude-sandbox claude . -- --dangerously-skip-permissions\n```\n\n### Changing the model\n\nThe model is baked into the image via `ANTHROPIC_MODEL`. To use a different model, build your own image:\n\n```bash\ngit clone https://github.com/dashaun/docker-model-runner-sandbox-claude\n# Edit ENV ANTHROPIC_MODEL in the Dockerfile\ndocker build -t my-claude-sandbox .\ndocker run --rm -v ~/.sandboxd:/sandboxd my-claude-sandbox setup-host\ndocker sandbox run -t my-claude-sandbox claude . -- --dangerously-skip-permissions\n```\n\n## How It Works\n\nDocker sandboxes are network-isolated VMs. Reaching Docker Model Runner at `localhost:12434` requires two things:\n\n1. **Proxy allowlist** — `setup-host` adds `localhost:12434` to `~/.sandboxd/proxy-config.json`, the global default policy inherited by all new sandboxes. This is a one-time, per-machine step.\n\n2. **NO_PROXY wrapper** — Docker Desktop injects `NO_PROXY=localhost,...` into every exec'd process, which would bypass the proxy for localhost traffic. The image wraps the `claude` binary with a shell script that unsets `NO_PROXY` before launching, routing all traffic through the proxy.\n\n## What's Included\n\n- **Python tooling**: pytest, black, pylint, ruff, mypy\n- **Java**: Bellsoft Liberica JDK 25 (via SDKMAN)\n- **Utilities**: curl, jq, zip, unzip, build-essential\n\n## Key Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `ANTHROPIC_BASE_URL` | `http://localhost:12434` | Docker Model Runner endpoint (via sandbox proxy) |\n| `ANTHROPIC_API_KEY` | `sk-ant-api03-dmr-placeholder-...` | Placeholder — DMR requires no auth, but Claude Code requires the `sk-ant-api03-` prefix |\n| `ANTHROPIC_MODEL` | `docker.io/ai/qwen3-coder-next:latest` | Model to use |\n| `DISABLE_PROMPT_CACHING` | `1` | Local models don't support prompt caching |\n\n## Connectivity Check\n\nFrom inside the sandbox, verify Docker Model Runner is reachable:\n\n```bash\ncheck-model-runner\n```\n\n## Troubleshooting\n\n### \"Unable to connect to API\"\n\nRe-run the setup command to ensure `localhost:12434` is in the proxy allowlist:\n\n```bash\ndocker run --rm -v ~/.sandboxd:/sandboxd dashaun/dmr-claude-sandbox setup-host\n```\n\nThen recreate the sandbox so it picks up the updated policy:\n\n```bash\ndocker sandbox rm dmr-claude-sandbox\ndocker sandbox run -t dashaun/dmr-claude-sandbox claude . -- --dangerously-skip-permissions\n```\n\n### Cannot connect to Docker Model Runner\n\n1. Verify Docker Desktop \u003e= 4.40.0\n2. Enable Model Runner: Settings \u003e Features in development \u003e Enable Docker Model Runner\n3. Pull a model: `docker model pull ai/qwen3-coder-next`\n4. Verify it's running on the host: `curl http://localhost:12434/v1/models`\n\n### Model not responding\n\n- Check available models: `docker model list`\n- Verify the model name matches `ANTHROPIC_MODEL` in the Dockerfile\n- Restart Docker Desktop if Model Runner becomes unresponsive\n\n### Java not found\n\nSDKMAN initializes in interactive bash sessions. Inside the sandbox:\n\n```bash\nsource /home/agent/.sdkman/bin/sdkman-init.sh\njava -version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashaun%2Fdocker-model-runner-sandbox-claude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashaun%2Fdocker-model-runner-sandbox-claude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashaun%2Fdocker-model-runner-sandbox-claude/lists"}