From 033bb1f4e699d2e469d76399b837c92c9fb633c2 Mon Sep 17 00:00:00 2001 From: Julia McGhee Date: Sat, 21 Mar 2026 23:06:03 +0000 Subject: [PATCH] Fix opencode install: download musl binary directly from GitHub The opencode.ai install script fails in CI (TLS errors, missing $SHELL). Download the pre-built musl binary directly from GitHub releases instead. Verified locally on linux/amd64 with PTY spawn. --- apps/harness/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/harness/Dockerfile b/apps/harness/Dockerfile index 672ddf7..c65d5b6 100644 --- a/apps/harness/Dockerfile +++ b/apps/harness/Dockerfile @@ -40,8 +40,9 @@ RUN apk add --no-cache git github-cli curl ca-certificates # Agent CLIs (installed globally before dropping to non-root) RUN npm install -g @anthropic-ai/claude-code @openai/codex -RUN SHELL=/bin/sh curl -fsSL https://opencode.ai/install | SHELL=/bin/sh sh && \ - cp /root/.opencode/bin/opencode /usr/local/bin/opencode +RUN ARCH=$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/') && \ + curl -fsSL -L "https://github.com/anomalyco/opencode/releases/latest/download/opencode-linux-${ARCH}-musl.tar.gz" \ + | tar xz -C /usr/local/bin opencode # MCP servers: Gitea (Go binary from builder stage) COPY --from=gitea-mcp-builder /usr/local/bin/gitea-mcp /usr/local/bin/gitea-mcp