2020-01-20 22:52:03 +09:00
|
|
|
# Dockerfile for v2ray based alpine
|
2024-12-29 23:22:33 +09:00
|
|
|
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
|
2020-01-20 22:52:03 +09:00
|
|
|
# Reference URL:
|
2021-06-19 15:51:45 +09:00
|
|
|
# https://github.com/v2fly/v2ray-core
|
|
|
|
# https://github.com/v2fly/geoip
|
|
|
|
# https://github.com/v2fly/domain-list-community
|
2020-01-20 22:52:03 +09:00
|
|
|
|
2024-12-29 23:22:33 +09:00
|
|
|
FROM alpine:latest
|
2020-01-20 22:52:03 +09:00
|
|
|
LABEL maintainer="Teddysun <i@teddysun.com>"
|
|
|
|
|
2020-02-20 20:50:14 +09:00
|
|
|
ARG TARGETPLATFORM
|
|
|
|
WORKDIR /root
|
|
|
|
COPY v2ray.sh /root/v2ray.sh
|
|
|
|
COPY config.json /etc/v2ray/config.json
|
2020-01-20 22:52:03 +09:00
|
|
|
RUN set -ex \
|
|
|
|
&& apk add --no-cache tzdata ca-certificates \
|
2021-06-19 15:51:45 +09:00
|
|
|
&& mkdir -p /var/log/v2ray /usr/share/v2ray \
|
2020-02-20 20:50:14 +09:00
|
|
|
&& chmod +x /root/v2ray.sh \
|
|
|
|
&& /root/v2ray.sh "${TARGETPLATFORM}" \
|
|
|
|
&& rm -fv /root/v2ray.sh \
|
2021-06-19 15:51:45 +09:00
|
|
|
&& wget -O /usr/share/v2ray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
|
2021-09-18 10:43:36 +09:00
|
|
|
&& wget -O /usr/share/v2ray/geoip-only-cn-private.dat https://github.com/v2fly/geoip/releases/latest/download/geoip-only-cn-private.dat \
|
2021-06-19 15:51:45 +09:00
|
|
|
&& wget -O /usr/share/v2ray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
|
2020-01-20 22:52:03 +09:00
|
|
|
|
|
|
|
VOLUME /etc/v2ray
|
|
|
|
ENV TZ=Asia/Shanghai
|
2022-01-03 15:11:58 +09:00
|
|
|
CMD [ "/usr/bin/v2ray", "run", "-config", "/etc/v2ray/config.json" ]
|