sbx-opencodev2/Dockerfile

12 lines
672 B
Text
Raw Permalink Normal View History

2026-10-10 23:51:14 +02:00
# 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}