mirror of
https://github.com/teddysun/across.git
synced 2025-04-23 04:19:31 +08:00
fix:can not download maxmind public database, need run docker build with --build-arg maxmind_key=YOUR_MAXMIND_LICENSE_KEY
This commit is contained in:
parent
d984be07cc
commit
4d7f819179
@ -6,6 +6,8 @@
|
|||||||
# https://github.com/v2ray/domain-list-community
|
# https://github.com/v2ray/domain-list-community
|
||||||
|
|
||||||
FROM golang:alpine AS builder
|
FROM golang:alpine AS builder
|
||||||
|
ARG maxmind_key
|
||||||
|
ENV MAXMIND_LICENSE_KEY ${maxmind_key}
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --no-cache git unzip \
|
&& apk add --no-cache git unzip \
|
||||||
&& mkdir -p /go/src/github.com/v2ray \
|
&& mkdir -p /go/src/github.com/v2ray \
|
||||||
@ -24,7 +26,7 @@ RUN set -ex \
|
|||||||
&& GEOSITE_TAG=$(wget -qO- https://api.github.com/repos/v2ray/domain-list-community/releases/latest | grep 'tag_name' | sed -E 's/.*"([^"]+)".*/\1/') \
|
&& GEOSITE_TAG=$(wget -qO- https://api.github.com/repos/v2ray/domain-list-community/releases/latest | grep 'tag_name' | sed -E 's/.*"([^"]+)".*/\1/') \
|
||||||
&& wget -O /go/bin/geosite.dat https://github.com/v2ray/domain-list-community/releases/download/${GEOSITE_TAG}/dlc.dat \
|
&& wget -O /go/bin/geosite.dat https://github.com/v2ray/domain-list-community/releases/download/${GEOSITE_TAG}/dlc.dat \
|
||||||
&& cd /tmp \
|
&& cd /tmp \
|
||||||
&& wget -O GeoLite2-Country-CSV.zip http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip \
|
&& wget -O GeoLite2-Country-CSV.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&suffix=zip&license_key=${MAXMIND_LICENSE_KEY}" \
|
||||||
&& unzip GeoLite2-Country-CSV.zip \
|
&& unzip GeoLite2-Country-CSV.zip \
|
||||||
&& rm -fv GeoLite2-Country-CSV.zip \
|
&& rm -fv GeoLite2-Country-CSV.zip \
|
||||||
&& mv GeoLite2* geoip \
|
&& mv GeoLite2* geoip \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user