HUB
Sign inSign up
opencode logo

sbx/opencode

Verified Publisher
Cloud

By Docker, Inc

•Updated about 11 hours ago

OpenCode coding agent on Docker Hardened Images for Docker Sandboxes

Sandbox Kit
3

100K+

sbx/opencode repository overview

Digest

sha256:417a0c6905bd…

Size

285.3 MB

Schema

v3

Pushed

about 11 hours ago

Specificationspec.yaml

WORKLOAD

OpenCode coding workload with native ACP, proxy-managed provider credentials, and MCP setup.


Arguments
NameRequiredDefaultDescription
modelOptional

OpenCode model as provider/model (opencode.json `model`); empty keeps the CLI default

reasoningEffortOptional

Model variant such as high or max (opencode.json `model` suffix); needs model; empty keeps the model default

versionRequired—

OpenCode release the image carries


Provides[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/ca-certificates@20250419, deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/iputils-ping@20240905, deb/[email protected], deb/less@668, deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/tzdata@2026, deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected], deb/[email protected]

CapabilitiesExpand a row to see its full configuration. See the full spec for the complete descriptor.
TypeRequiredDescription
com.docker.sandbox/sbx@1Required—
com.docker.sandbox/network-policy@1Required—
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@1OptionalAnthropic API access
com.docker.sandbox/credential@1OptionalOpenRouter API access
com.docker.sandbox/credential@1OptionalxAI API access
com.docker.sandbox/lifecycle@1Required—
com.docker.sandbox/agent-sessions@1Optional—
com.docker.sandbox/agent-interactive-sessions@1Optional—
com.docker.sandbox/agent-skills@1Optional—
com.docker.sandbox/agent-context@1Optional—
com.docker.sandbox/agent-context@2Optional—
com.docker.sandbox/dockerd@1Optional—
com.docker.sandbox/acp@1Optional—

Try this kit

Run this in a sandbox (opens in a new tab)
sbx run sbx/opencode: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⁠

⁠OpenCode for Docker Sandboxes

This v3 workload Kit packages OpenCode⁠ for Docker Sandboxes. It includes the agent and a development environment. Start the workload to use OpenCode in an isolated workspace.

This Kit is built on Docker Hardened Images.

⁠Run

sbx run sbx/opencode:latest /path/to/workspace

To run a single prompt in a running sandbox:

sbx exec <sandbox> opencode run "Summarize this repository"

The kit configures OpenCode to allow tool execution without approval prompts.

⁠Kit arguments

Set these arguments when creating the sandbox with --kit-arg <name>=<value>. Repeat the flag for multiple arguments. Use --kit-arg <kit>.<name>=<value> to target one kit in a composition, as in the example below.

ArgumentDefaultDescriptionAccepted values
model""OpenCode model as provider/model (opencode.json model); empty keeps the CLI defaultEmpty, or a provider/model value. Letters, digits, ., _, /, :, and -.
reasoningEffort""Model variant such as high or max; needs model; empty keeps the model defaultLetters, digits, ., _, and -.

An empty value keeps the agent default. The model must be available to your provider account. OpenCode applies an effort as a variant of a named model, and each model has its own variant names, so reasoningEffort needs model and the sandbox is not created without it. These are kit configuration inputs, separate from agent command-line arguments passed after --.

sbx run sbx/opencode:latest \
  --kit-arg opencode.model=anthropic/claude-sonnet-4-5 --kit-arg opencode.reasoningEffort=high \
  /path/to/workspace

The kit writes the selection to ~/.config/opencode/opencode.json as provider/model#variant when the sandbox is created and keeps the other settings in that file.

⁠Authentication and configuration

Bind the provider credentials you use on the host. Supported services are github, google, groq, openai, anthropic, openrouter, and xai. For example, run sbx secret set anthropic. OpenAI also supports a ChatGPT OAuth credential through sbx secret set openai --oauth. Host-bound credentials remain proxy-managed.

A host github credential also enables OpenCode's GitHub Copilot model provider. Configure it with sbx secret set github on the host. The credential needs access to Copilot.

When the runtime supplies an MCP gateway, the kit registers it automatically in ~/.config/opencode/opencode.json. Existing unrelated settings and server entries are preserved.

ACP support is included. Configure an ACP client to open a non-TTY stream to the sandbox.

sbx exec -i <sandbox> opencode acp

The sandbox supplies the isolation for agent tool execution. Launch the kit through Docker Sandboxes and configure extra tool or MCP destinations in the runtime network policy as needed.

If a tool cannot reach a service, run sbx policy log on the host to identify blocked destinations. Additional language-server downloads may need extra destinations in the runtime network policy.

The agent owns the OpenCode install. To move to a newer release inside a sandbox, run opencode upgrade. A new sandbox starts from the release this Kit pins.

⁠Source and security

For the Kit format and capability contracts, see the Sandbox Kit v3 specification⁠.

For runtime setup, see the Docker Sandboxes documentation⁠. For provenance, SBOM, VEX, and image verification, see the Docker Hardened Images documentation⁠.

OpenCode is an open-source coding agent. Product names and logos do not imply sponsorship or endorsement.