Dockerfile 887 B

123456789101112131415161718192021222324
  1. # Dockerfile for v2ray based alpine
  2. # Copyright (C) 2019 - 2025 Teddysun <[email protected]>
  3. # Reference URL:
  4. # https://github.com/v2fly/v2ray-core
  5. # https://github.com/Loyalsoldier/v2ray-rules-dat
  6. FROM alpine:latest
  7. LABEL maintainer="Teddysun <[email protected]>"
  8. WORKDIR /root
  9. COPY v2ray.sh /root/v2ray.sh
  10. COPY config.json /etc/v2ray/config.json
  11. RUN set -ex \
  12. && apk add --no-cache tzdata ca-certificates \
  13. && mkdir -p /var/log/v2ray /usr/share/v2ray \
  14. && chmod +x /root/v2ray.sh \
  15. && /root/v2ray.sh \
  16. && rm -fv /root/v2ray.sh \
  17. && wget -O /usr/share/v2ray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
  18. && wget -O /usr/share/v2ray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
  19. VOLUME /etc/v2ray
  20. ENV TZ=Asia/Shanghai
  21. CMD [ "/usr/bin/v2ray", "run", "-config", "/etc/v2ray/config.json" ]