Use Opencode V2

This commit is contained in:
Jarek Rozanski 2026-10-10 17:21:37 +02:00
commit b1f89eef85
No known key found for this signature in database
2 changed files with 12 additions and 8 deletions

View file

@ -70,7 +70,7 @@ Bumping a pinned LSP version means editing the corresponding `ARG`/`FROM` tag in
**Containerfile** — multi-stage build on `debian:trixie-slim`:
- JDK and Node are copied in from their official upstream images (`eclipse-temurin:25-jdk-noble`, `node:24-trixie-slim`) rather than apt-installed, keeping the final image slim while staying on a mainstream glibc distro (Alpine/musl is avoided — it breaks JVM and native Node addon compatibility).
- pnpm is installed via its own standalone installer script, pinned to a specific version.
- OpenCode is downloaded directly from its canonical GitHub releases (`github.com/anomalyco/opencode`) for the container's architecture, and its SHA256 is checked against a hash pinned in the Containerfile before it's installed — there's no maintainer-published signature for OpenCode releases, so this hash is captured by hand and is the actual root of trust here. Bump `OPENCODE_VERSION` and re-run the `sha256sum` steps documented in the Containerfile's comments whenever you upgrade it.
- OpenCode v2 is downloaded directly from its official download host (`opencode.ai/files/bin`, the glibc build of v2) for the container's architecture, and its SHA256 is checked against a hash pinned in the Containerfile before it's installed — there's no maintainer-published signature for OpenCode releases, so this hash is captured by hand and is the actual root of trust here. Bump `OPENCODE_VERSION` and re-run the `sha256sum` steps documented in the Containerfile's comments whenever you upgrade it.
- A few build-time smoke tests (`ldd`, `java -version`, `node --version`, etc.) fail the build immediately if anything is broken, rather than surfacing at first `make opencode`.
**Makefile** — four targets: