Skip to content

Commit 9a40566

Browse files
Patel230claude
andcommitted
fix(docker): build with all 6 siblings via generated go.work
The Dockerfile only cloned eyrie and ran 'go mod download' before any workspace existed — so it hit the frozen-proxy checksum SECURITY ERROR and missed the other 5 siblings hawk now imports. Clone all 6 into external/ and generate a go.work with replace directives (the committed go.work is excluded by .dockerignore), then build without a pre-download. Verified the build sequence locally produces the hawk binary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent aaae441 commit 9a40566

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

Dockerfile

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,27 @@ RUN apk add --no-cache git ca-certificates tzdata
55

66
WORKDIR /build
77

8-
# Clone eyrie (unpublished dependency with local-only packages).
9-
RUN git clone --depth=1 https://github.com/GrayCodeAI/eyrie.git /eyrie
10-
11-
COPY go.mod go.sum ./
12-
RUN go mod download
8+
# GrayCodeAI sibling modules are unpublished at their current code (the public proxy
9+
# froze v0.1.0 at old commits). Resolve them locally via the committed go.work
10+
# (use . + replace => ./external/<repo>), bypassing the proxy/sumdb entirely.
11+
ENV GOPRIVATE=github.com/GrayCodeAI/* \
12+
GONOSUMDB=github.com/GrayCodeAI/* \
13+
GONOSUMCHECK=1
1314

1415
COPY . .
15-
# Use go.work to resolve the local eyrie checkout — avoids mutating go.mod at build time.
16-
RUN go work init . /eyrie && \
16+
17+
# Clone every sibling hawk imports into ./external, then generate a go.work that
18+
# resolves them locally. NOTE: the committed go.work/go.work.sum are excluded by
19+
# .dockerignore, so we must (re)create the workspace here. Do NOT run
20+
# 'go mod download' first — the frozen-proxy v0.1.0 fails checksum verification.
21+
RUN rm -rf external go.work go.work.sum && mkdir -p external && \
22+
for repo in eyrie inspect sight tok trace yaad; do \
23+
git clone --depth=1 "https://github.com/GrayCodeAI/${repo}.git" "external/${repo}"; \
24+
done && \
25+
{ echo "go 1.26.4"; echo; echo "use ."; echo; echo "replace ("; \
26+
for repo in eyrie inspect sight tok trace yaad; do \
27+
echo " github.com/GrayCodeAI/${repo} => ./external/${repo}"; \
28+
done; echo ")"; } > go.work && \
1729
CGO_ENABLED=0 GOOS=linux go build -trimpath \
1830
-ldflags="-s -w -X main.Version=$(git describe --tags --always 2>/dev/null || echo dev)" \
1931
-o hawk ./cmd/hawk

0 commit comments

Comments
 (0)