Update Dockerfile

This commit is contained in:
Teddysun 2019-11-29 21:59:52 +09:00
parent b8d3f38cd2
commit 8da22d1d74
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D

View File

@ -2,6 +2,8 @@
# Copyright (C) 2019 Teddysun <i@teddysun.com> # Copyright (C) 2019 Teddysun <i@teddysun.com>
# Reference URL: # Reference URL:
# https://github.com/v2ray/v2ray-core # https://github.com/v2ray/v2ray-core
# https://github.com/v2ray/geoip
# https://github.com/v2ray/domain-list-community
FROM golang:alpine AS builder FROM golang:alpine AS builder
RUN set -ex \ RUN set -ex \
@ -19,8 +21,8 @@ RUN set -ex \
&& cd geoip \ && cd geoip \
&& go get -d \ && go get -d \
&& go build -o /go/bin/geoip \ && go build -o /go/bin/geoip \
&& 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 http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip \
&& unzip GeoLite2-Country-CSV.zip \ && unzip GeoLite2-Country-CSV.zip \