From 27991e73093fb2ee583fc4bf09cfef08adb9c528 Mon Sep 17 00:00:00 2001 From: Julia McGhee Date: Sat, 21 Mar 2026 21:06:11 +0000 Subject: [PATCH] Fix gitea-mcp COPY path: use explicit GOBIN instead of guessing GOPATH default golang:1.26-alpine uses GOPATH=/go (not /root/go), so the binary was installed to /go/bin/gitea-mcp but the COPY looked at /root/go/bin/. Set GOBIN=/usr/local/bin for a deterministic install location. Also adds harness MCP server bundle to the image. --- apps/harness/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/harness/Dockerfile b/apps/harness/Dockerfile index ef7e1ee..5121161 100644 --- a/apps/harness/Dockerfile +++ b/apps/harness/Dockerfile @@ -1,4 +1,5 @@ FROM golang:1.26-alpine AS gitea-mcp-builder +ENV GOBIN=/usr/local/bin RUN go install gitea.com/gitea/gitea-mcp@latest FROM node:20-alpine AS base @@ -38,7 +39,7 @@ RUN curl -fsSL https://opencode.ai/install | sh || \ echo "WARN: opencode install failed, skipping" # MCP servers: Gitea (Go binary from builder stage) -COPY --from=gitea-mcp-builder /root/go/bin/gitea-mcp /usr/local/bin/gitea-mcp +COPY --from=gitea-mcp-builder /usr/local/bin/gitea-mcp /usr/local/bin/gitea-mcp # MCP servers: Node.js packages (pre-installed to avoid npx cold starts) RUN npm install -g \ @@ -57,6 +58,9 @@ COPY --from=builder /app/apps/harness/public ./apps/harness/public COPY --from=builder --chown=nextjs:nodejs /app/apps/harness/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/apps/harness/.next/static ./apps/harness/.next/static +# Harness MCP server (self-contained bundle for agent→harness communication) +COPY --from=builder /app/apps/harness/dist/mcp-server.mjs ./apps/harness/dist/mcp-server.mjs + # PTY server dependencies + custom server COPY --from=builder /app/node_modules/.pnpm/node-pty*/node_modules/node-pty ./node_modules/node-pty COPY --from=builder /app/node_modules/.pnpm/ws*/node_modules/ws ./node_modules/ws