Sign inSign up

docker/sbx-kit-opencode-mixin

Verified Publisher

By Docker, Inc.

•Updated 5 days ago

OpenCode as a mixin -- node and the CLI in an overlay, with seven optional proxy-managed provider...

Sandbox Kit
0

187

docker/sbx-kit-opencode-mixin repository overview

Digest

sha256:9c6b01ac11c8…

Size

240.4 MB

Schema

v3

Pushed

5 days ago

Specificationspec.yaml

MIXIN

OpenCode as a mixin -- node and the CLI in an overlay, with seven optional proxy-managed provider credentials, the MCP registration and the Copilot seed. Layer it onto a shell base and run `opencode`.


Arguments
NameRequiredDefaultDescription
versionOptional1.18.31

OpenCode release to install



CapabilitiesExpand a row to see its full configuration. See the full spec for the complete descriptor.
TypeRequiredDescription
com.docker.sandbox/network-policy@1Required—
com.docker.sandbox/credential@1OptionalAnthropic API access
com.docker.sandbox/credential@1OptionalGitHub and Copilot access
com.docker.sandbox/credential@1OptionalGoogle AI API access
com.docker.sandbox/credential@1OptionalGroq API access
com.docker.sandbox/credential@1OptionalOpenAI API access (API key or ChatGPT OAuth)
com.docker.sandbox/credential@1OptionalOpenRouter API access
com.docker.sandbox/credential@1OptionalxAI API access
com.docker.sandbox/lifecycle@1Required—
com.docker.sandbox/agent-context@1Required—

Requiresdeb/jq, deb/util-linux

Apply this mixin to a sandbox

sbx run <agent> --kit docker/sbx-kit-opencode-mixin:latest

Make sure you have docker sbx installed

Run the following command to install sbx on your machine.

macOS
brew install docker/tap/sbx
Windows
winget install Docker.sbx
Learn more about docker sbx⁠

Note

Experimental: Sandbox Kit v3

This kit uses the experimental Sandbox Kit specification⁠, specifically v3⁠. The format and runtime behavior may change before v3 is stable.

⁠opencode-mixin

OpenCode⁠ as a mixin — the same agent as the opencode⁠ workload kit, packaged as an overlay you layer onto a shell base instead of running as the sandbox's own image.

⁠Usage

sbx run --kit ./opencode-mixin/ <shell-workload>

Or from a git URL targeting this repo:

sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=opencode-mixin" <shell-workload>

The base workload keeps its own launch command, so nothing starts the agent for you:

opencode
opencode run "explain this repo"

The OpenCode release is pinned by the kit's version arg, which the descriptor hands to the recipe as OPENCODE_VERSION and also expands into provides: ["opencode@<version>"] — so the kit advertises the release it installs. Move it with --build-arg version=1.2.3 (npm semver, no leading v), and keep it equal to ../opencode⁠'s default.

⁠What it carries

  • opencode-ai, installed with npm install -g --prefix /opt/opencode on the same base the workload uses, plus that base's node and a launcher shim on PATH. Unlike this repo's other agent mixins the install relocates cleanly, so the overlay does not have to reproduce a tree at the path it was built at — but the build stage stays on the workload's base, because that is where the corepack hazard is real and where the --version gate means something.
  • The seven optional proxy-managed provider credentials, the MCP-gateway registration and the GitHub Copilot seed.

⁠What it deliberately leaves to the base workload

  • The launch command. A mixin does not set an entrypoint.
  • The apt mirrors and the apt-get update hook. Those refresh the base image's own package sources; a workload owns its base, a mixin does not.
  • jq and flock, which the Copilot seed hook shells out to. Every sandbox-templates base ships both; the hook exits without seeding rather than failing if it cannot build the seed.
  • The context-file profile. filename: is workload-only; this kit contributes a body through contentFile.
  • sbx@1. A mixin's image config does not become the composed image's.

⁠Not declared

Neither agent-sessions@1 nor agent-skills@1, matching the workload: the v2 TCK data omitted promptArgs because no provider credential exists on the runner to answer a prompt, and nothing in this kit ever named a skills directory for opencode.

This week's pulls

Pulls:

3

Sep 14 to Sep 20