fix(docker): copy anydoc-go go.mod before go mod download

go.mod replace-points firecrawl/anydoc to ./third_party/anydoc-go, so the vendored module must exist in the image before dependency download.
main
wizardchen 2026-08-16 12:24:16 +08:00 committed by lyingbug
parent e123f8247e
commit ad2f1d1450
1 changed files with 3 additions and 1 deletions

View File

@ -24,8 +24,10 @@ RUN if [ -n "$APK_MIRROR_ARG" ]; then \
# Install migrate tool
RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
# Copy go mod and sum files
# Copy go mod files. go.mod replace-points anydoc at ./third_party/anydoc-go,
# so that module's go.mod must exist before `go mod download`.
COPY go.mod go.sum ./
COPY third_party/anydoc-go/go.mod third_party/anydoc-go/go.mod
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY cmd/download cmd/download
RUN go run cmd/download/duckdb/duckdb.go