Dockerfile.architecture 926 B

12345678910111213141516171819202122232425
  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. ARG TARGETPLATFORM
  9. WORKDIR /root
  10. COPY v2ray.sh /root/v2ray.sh
  11. COPY config.json /etc/v2ray/config.json
  12. RUN set -ex \
  13. && apk add --no-cache tzdata ca-certificates \
  14. && mkdir -p /var/log/v2ray /usr/share/v2ray \
  15. && chmod +x /root/v2ray.sh \
  16. && /root/v2ray.sh "${TARGETPLATFORM}" \
  17. && rm -fv /root/v2ray.sh \
  18. && wget -O /usr/share/v2ray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
  19. && wget -O /usr/share/v2ray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
  20. VOLUME /etc/v2ray
  21. ENV TZ=Asia/Shanghai
  22. CMD [ "/usr/bin/v2ray", "run", "-config", "/etc/v2ray/config.json" ]