Update Dockerfile

This commit is contained in:
Teddysun 2020-01-20 21:40:05 +09:00
parent 039d3113c4
commit e14e181b0a
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D

View File

@ -1,5 +1,5 @@
# Dockerfile for v2ray based alpine # Dockerfile for v2ray based alpine
# Copyright (C) 2019 Teddysun <i@teddysun.com> # Copyright (C) 2019 - 2020 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/geoip
@ -17,19 +17,8 @@ RUN set -ex \
&& go build -o /go/bin/v2ray \ && go build -o /go/bin/v2ray \
&& cd ../infra/control/main \ && cd ../infra/control/main \
&& go build -o /go/bin/v2ctl \ && go build -o /go/bin/v2ctl \
&& git clone https://github.com/v2ray/geoip.git \ && wget -O /go/bin/geosite.dat https://github.com/v2ray/domain-list-community/releases/latest/download/dlc.dat \
&& cd geoip \ && wget -O /go/bin/geoip.dat https://github.com/v2ray/geoip/releases/latest/download/geoip.dat
&& go get -d \
&& 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/') \
&& wget -O /go/bin/geosite.dat https://github.com/v2ray/domain-list-community/releases/download/${GEOSITE_TAG}/dlc.dat \
&& cd /tmp \
&& wget -O GeoLite2-Country-CSV.zip https://dl.lamp.sh/files/GeoLite2-Country-CSV.zip \
&& unzip GeoLite2-Country-CSV.zip \
&& rm -fv GeoLite2-Country-CSV.zip \
&& mv GeoLite2* geoip \
&& /go/bin/geoip --country=./geoip/GeoLite2-Country-Locations-en.csv --ipv4=./geoip/GeoLite2-Country-Blocks-IPv4.csv --ipv6=./geoip/GeoLite2-Country-Blocks-IPv6.csv \
&& mv geoip.dat /go/bin/
FROM alpine:latest FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>" LABEL maintainer="Teddysun <i@teddysun.com>"