mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-28 05:46:36 +08:00
fix(agent): commit GeoLite2 mmdb as build fallback
Vendor GeoLite2-Country.mmdb in the repository so agent builds still work when the remote download is unavailable. Update the fetch script and agent Dockerfile to prefer a fresh download and fall back to the committed database file.
This commit is contained in:
@@ -17,9 +17,8 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
go mod download
|
||||
|
||||
COPY . .
|
||||
RUN apk add --no-cache curl \
|
||||
&& curl -fsSL -o internal/apps/agent/geoipdata/GeoLite2-Country.mmdb \
|
||||
https://raw.githubusercontent.com/Loyalsoldier/geoip/release/GeoLite2-Country.mmdb
|
||||
RUN apk add --no-cache bash curl \
|
||||
&& bash scripts/fetch-agent-geoip-mmdb.sh
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
go build -trimpath -ldflags "-s -w -X 'github.com/Rain-kl/Wavelet/internal/apps/agent/config.Version=$VERSION'" -o /build/bin/openflare-agent ./cmd/agent/main.go
|
||||
|
||||
Reference in New Issue
Block a user