Fix gitea-mcp COPY path: use explicit GOBIN instead of guessing GOPATH default
Some checks failed
Deploy Production / deploy (push) Failing after 1m5s
CI / build (push) Failing after 1m11s
CI / lint-and-test (push) Successful in 34s

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.
This commit is contained in:
Julia McGhee
2026-03-21 21:06:11 +00:00
parent 33e2d8505a
commit 27991e7309

View File

@@ -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