Base image for the OpenCode kit for Docker Sandboxes
68
Base image for the OpenCode kit for Docker Sandboxes.
Built on docker/sandbox-templates:shell-docker: the standard sandbox tool
chain plus a Docker engine, requesting Docker-in-Docker via
com.docker.sandboxes.start-docker=true. On top of that:
opencode, installed from the opencode-ai package
into the image's npm global prefix, so the binary resolves as
/usr/local/share/npm-global/bin/opencodeOpenCode's README leads with curl -fsSL https://opencode.ai/install | bash and
lists npm second. Both are published by the OpenCode project and track each
other — the npm version and the GitHub release tag are the same string — and
this image takes the npm route because of what it means for a build:
api.github.com, which is rate-limited per IP; on a busy
shared runner that limit can be exhausted by something else and fail the
build. npm resolves the version from the registry instead.PATH. The standalone installer puts the binary in ~/.opencode/bin and
appends a PATH line to a shell rc file — which a container process started
by exec never reads, so that route would need a PATH edit or a symlink
here.registry.npmjs.org while it runs, whichever way it was
installed, so the kit has to allow that host regardless. The installer route
would add opencode.ai and the GitHub release-asset hosts to the build on
top of it.It also leaves opencode upgrade resolving new versions from npm — the same
host, and a prefix the non-root agent user owns, so in-place self-update
keeps working.
The cost is size: the npm package ships the platform binary as an optional dependency and its postinstall copies it into place, so the installed tree is roughly twice the size of the bare binary the installer would drop.
BASE_IMAGE — re-point or digest-pin the base.OPENCODE_VERSION — pin a published version (1.2.3, npm semver, no leading
v). Left empty, the build installs the newest published version.Runs as the non-root agent user, with CMD ["opencode"].
Content type
Image
Digest
sha256:6693d91ac…
Size
817.5 MB
Last updated
about 16 hours ago
docker pull sbx/opencode-image