Fix opencode not found: symlink installer binary to /usr/local/bin
The opencode curl installer puts the binary in /root/.local/bin which isn't on PATH for the nextjs user. Add a symlink to /usr/local/bin after install. Also ensure /usr/local/bin is always in the PATH passed to spawned agent processes.
This commit is contained in:
@@ -42,6 +42,8 @@ RUN apk add --no-cache git github-cli curl ca-certificates
|
||||
RUN npm install -g @anthropic-ai/claude-code @openai/codex
|
||||
RUN curl -fsSL https://opencode.ai/install | sh || \
|
||||
echo "WARN: opencode install failed, skipping"
|
||||
# Ensure opencode is on PATH (installer puts it in ~/.local/bin)
|
||||
RUN if [ -f /root/.local/bin/opencode ]; then ln -s /root/.local/bin/opencode /usr/local/bin/opencode; fi
|
||||
|
||||
# MCP servers: Gitea (Go binary from builder stage)
|
||||
COPY --from=gitea-mcp-builder /usr/local/bin/gitea-mcp /usr/local/bin/gitea-mcp
|
||||
|
||||
Reference in New Issue
Block a user