OpenCode wired to a local Docker Model Runner as a mixin -- the agent in an overlay with the prov...
44
OpenCode wired to a local Docker Model Runner as a mixin -- the agent in an overlay with the provider config that points it at the host's OpenAI-compatible endpoint and discovers every pulled model. Layer it onto a shell base and run `opencode`.
| Name | Required | Default | Description |
|---|---|---|---|
version | Optional | 1.18.32 | OpenCode release the base template is expected to carry |
[email protected]| Type | Required | Description | |
|---|---|---|---|
com.docker.sandbox/network-policy@1 | Required | — | |
com.docker.sandbox/lifecycle@1 | Required | — | |
com.docker.sandbox/agent-context@1 | Required | — | |
sbx run <agent> --kit docker/sbx-kit-opencode-model-runner-mixin:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxNote
Experimental: Sandbox Kit v3This kit uses the experimental Sandbox Kit specification, specifically v3. The format and runtime behavior may change before v3 is stable.
OpenCode wired to a local Docker Model
Runner as a mixin — the same
agent and configuration as the
opencode-model-runner workload kit, packaged as
an overlay you layer onto a shell base instead of running as the sandbox's own
image.
Prerequisites: Docker Model Runner must be enabled on the host with TCP access on port 12434, and at least one model must be pulled:
$ docker desktop enable model-runner --tcp $ docker model pull <model>Linux hosts:
host.docker.internalrequires Docker to be started with--add-host=host.docker.internal:host-gateway.
sbx run --kit ./opencode-model-runner-mixin/ <shell-workload> ~/my-project
Or from a git URL targeting this repo:
sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=opencode-model-runner-mixin" <shell-workload>
The base workload keeps its own launch command, so nothing starts the agent for you:
opencode
Do not layer this onto the opencode kit. This overlay ships
its own OpenCode, so that composition would put two installations in one
sandbox with one of them shadowed. Use a shell base.
docker/sandbox-templates:opencode-docker
template the workload runs — there is no install to relocate, because this
kit never ran one. The copy preserves the template's absolute paths so npm's
relative bin symlink keeps resolving; the consequence is that it writes into
the composed base's global node_modules.node, for a base that has none.~/.config/opencode/opencode.json) and the Model Runner
egress. The config arrives as a lifecycle files: declaration rather than as
a layer, so it is rewritten on every start.filename: is workload-only; this kit
contributes a body through contentFile.sbx@1. Both describe how the host drives the
workload's own entrypoint, which here is the base's.