Opencode V2 sbx agent

This commit is contained in:
Jarek Rozanski 2026-10-10 23:51:14 +02:00
commit 962002aec1
No known key found for this signature in database
6 changed files with 345 additions and 0 deletions

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
# Pins the OpenCode CLI version inside the sandbox to OpenCode v2.
#
# docker/sandbox-templates:opencode bakes in OpenCode v1 (the `opencode-ai`
# npm package, 1.18.32 as of writing). OpenCode v2 ships as a different npm
# package, `@opencode/cli` (confirmed via `npm view @opencode/cli version`
# and by running `opencode --version` in the built image, which reports
# "opencode v2.0.26"). Both packages install a binary named `opencode` into
# the same global npm prefix, so the old one has to be removed first.
FROM docker/sandbox-templates:opencode
ARG OPENCODE_VERSION=2.0.26
RUN npm uninstall -g opencode-ai \
&& npm install -g @opencode/cli@${OPENCODE_VERSION}