From be85baf410dc1056e037c531a4f90fd0fa430385 Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 22 May 2026 12:12:33 +0200 Subject: [PATCH] fix(ci): allow Dockerfile build to fetch internal gitea modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mcp-chassis (added in commit 658f4ba) is hosted at gitea.d-ma.be, and Gitea returns http:// in its go-import meta tag. Default go module resolution goes through proxy.golang.org (which can't reach internal hosts) and falls back to direct git, which gets the http:// URL and refuses it. Fix: - GOPRIVATE=gitea.d-ma.be — skip proxy.golang.org - GOPROXY=direct — direct git, no proxy attempt - GOSUMDB=off — bypass sumdb (also doesn't know internal modules) - git config insteadOf rewrites http:// → https:// for gitea.d-ma.be Without this, gitea-mcp CI Build & Import failed on the chassis port (sha=658f4ba). Re-running CI should now succeed. Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index b05ffc6..f0ca672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,16 @@ FROM golang:1.26-alpine AS build WORKDIR /src + +# Fetch internal gitea-hosted Go modules (e.g. mcp-chassis) without going +# through proxy.golang.org and without HTTP→HTTPS surprises. Gitea returns +# http:// in its go-import meta tag, so rewrite to https here and bypass +# the module proxy + sumdb. +RUN apk add --no-cache git && \ + git config --global url."https://gitea.d-ma.be/".insteadOf "http://gitea.d-ma.be/" +ENV GOPRIVATE=gitea.d-ma.be +ENV GOPROXY=direct +ENV GOSUMDB=off + COPY go.mod go.sum ./ RUN go mod download COPY . .